Timeout/ReadWriteTimeout ignored
See original GitHub issueEnvironment: RestSharp v105.2.3 with .NET Framework 4.5.2
I am consuming an HTTP API action and sometimes it blocks forever (Fiddler shows it never completes). So, to handle this I have set the RestClient
Timeout
and ReadWriteTimeout
to 10000 ms, but it seems that these timeout values aren’t taken into consideration, because the request timeouts after 100 seconds, that is by default.
The requests and responses send are very small, no more than several KB.
Same problem described here: https://stackoverflow.com/questions/44109895/restsharp-restclient-ignores-timeout
Issue Analytics
- State:
- Created 6 years ago
- Reactions:5
- Comments:16 (4 by maintainers)
Top Results From Across the Web
HttpWebRequest ReadWriteTimeout ignored in .NET
When writing data to a web server, my tests show HttpWebRequest.ReadWriteTimeout is ignored, contrary to the MSDN spec. For example if I set ......
Read more >HttpWebRequest timeout not working - Microsoft Q&A
ReadWriteTimeout = 10000; // Get the response. Console.WriteLine("Away we go "+ sRequest ); HttpWebResponse response = (HttpWebResponse)request.
Read more >HttpWebRequest timeout not working
When I disconnect the ethernet, the request just hangs. HttpWebRequest request = (HttpWebRequest )WebRequest.Create(WebAddressPreAmble + WebAddress +.
Read more >WithReadWriteTimeout Method (readWriteTimeout)
Custom read-write timeout value (in milliseconds) to set in the HttpWebRequest object used for ... A value less than or equal to 0...
Read more >Timeout Property
The value of this property is assigned to the ReadWriteTimeout and Timeout properties of the ... A value less than or equal to...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
You should always be prepared that the server can time out your request as well.
Same issue. This issue seems to come up a lot and I seem to be able to work around it by validating the Request and Client timeouts are both set.
Without really digging too far into the RestClient class, what is the difference between the Client level timeout and the Request level timeout?