-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Investigate options for default per-operation timeout #7484
Comments
There seem to be a few different concerns in this issue. First: should we have a default timeout and I think the answer here is no, we should let the platform decide when to timeout. Otherwise, we'll have to be very careful that long/slow operations have their timeout bumped up, and since swagger doesn't give us that information, it would be manual and error-prone. Second: exposing these controls to the consumer: OperationRequestOptions has a timeout property, which we already honor today and OperationOptions has an abortSignal. So it's all good, any client operation can be configured by the consumer. Third: Retry handling for Abort vs Timeout. This is a little more complicated. For the browser, this raises a "TimeoutError" DOMException, which we don't seem to handle at all, even in systemErrorRetryPolicy. This work was tracked by #9568 which has been closed in favor of moving to In the Node case, we actually use an AbortSignal to do the cancelation of the request (e.g. it fails with an AbortError instead of a timeout). We could change this and leverage the socket timeout options instead, using the request's "timeout" event if we wanted to fail the request with a better error or be able to distinguish it inside exponentialRetryPolicy. In any case, it doesn't appear that we retry when a request hits the user-configurable timeout. The only time we retry is when we hit one of the following Node networking errors:
Which appear to be system-dependant. @bterlson / @ramya-rao-a - it seems like the only work here could be throwing a better timeout error in the Node case and making the retry policy be able to retry when we hit a user timeout. Is this worth doing this semester? |
Agree with the analysis - |
Hi @bterlson, we deeply appreciate your input into this project. Regrettably, this issue has remained inactive for over 2 years, leading us to the decision to close it. We've implemented this policy to maintain the relevance of our issue queue and facilitate easier navigation for new contributors. If you still believe this topic requires attention, please feel free to create a new issue, referencing this one. Thank you for your understanding and ongoing support. |
Some users have observed that when our client libraries send a request but a response never comes back, the behavior is less than desirable. Namely, you get a ECONNRESET sort of error after many minutes, and no retries occur.
We should investigate potential solutions to this problem, including:
timeout
in operation options to allow users to customize the per-operation timeout.It was observed that there is a semantic difference between the following, which I don't believe we're making in Storage today:
client.get( { timeout: 1000 })
;client.get( { abortSignal: AbortController.timeout(1000) });
For one, we want to retry. For two, we don't.
/cc @chradek @mikeharder
The text was updated successfully, but these errors were encountered: