I am using ElasticSearch with Nest (0.9.16) and have some queries which take longer than 60 seconds. When that happens, I receive the following error:
The request was aborted: The request was canceled.
While I am concerned that the query is taking such a long time, for this question, I am just interested if there is a way to increase the timeout. I have not been able to find a way to increase the timeout.
Note, I do see a couple of places where I can set a timeout, but these are not the right places:
var setting = new ConnectionSettings(new Uri(searchUrl)).SetTimeout(200000);
or
searchdescriptor.Timeout("120000");
The first one sets the connection timeout and the second one sets the ElasticSearch timeout, both of which are not helpful here.
Thanks, Eric
Actually, much to my chagrin, the ConnectionSettings().SetTimeout() does in fact increase the request timeout and solve my problem. I am not sure why I missed this initially.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With