question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Timeout/ReadWriteTimeout ignored

See original GitHub issue

Environment: 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:closed
  • Created 6 years ago
  • Reactions:5
  • Comments:16 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
alexeyzimarevcommented, Aug 20, 2018

You should always be prepared that the server can time out your request as well.

1reaction
maplemalecommented, Aug 4, 2018

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?

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found