-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
Description
NEST/Elasticsearch.Net version: 2.4.7
Elasticsearch version: All Versions
Description of the problem including expected versus actual behavior:
Async requests don't respect RequestTimeout set in ConnectionSettings (including the 60 second default). My team recently ran into network issues, meaning these requests to the cluster weren't completing, and this bug in ES.Net exacerbated the issue by pooling up an ever growing number of connections until we couldn't handle any more.
I located the bug here:
| var response = (HttpWebResponse)(await request.GetResponseAsync().ConfigureAwait(false)); |
As you can see on MSDN, HttpWebRequest.Timeout is NOT respected on async requests. Not sure the best solution, but one is to use HttpClient, which doesn't have this issue.
Steps to reproduce:
- Network issues or slow cluster response that causes a request to take longer than RequestTimeout in ConnectionSettings.
- The request does not time out.
Metadata
Metadata
Assignees
Labels
No labels