RestSharp: Timeout/ReadWriteTimeout ignored

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

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Reactions: 5
  • Comments: 16 (4 by maintainers)

Most upvoted comments

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?