-
Notifications
You must be signed in to change notification settings - Fork 568
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
node-http-handler
unexpected TimeoutError
from socket
#6271
Comments
Hi @nkomonen-amazon - thanks for reaching out. I'm not seeing any recent change to @smithy/node-http-handler that's relevant to what you're reporting, however you're on older version. See version history here. Can you try the recent version? If issue persists, please provide minimal repro for us to further investigate. Feel free to cut internal SIM to the team as well. |
Hey John! The code that I assume has an issue is over a year old, so I don't think a newer version is the fix. The issue is happening for a subset of our users, so I cannot reproduce the problem myself. I've opened a SIM ticket as well. Thanks! |
Thanks for your response. Our team has received an internal ticket for further investigation. However, to better understand and examine the reported behavior, we request that you provide us with a minimal reproducible code snippet or example that demonstrates the problem. Additionally, any relevant logs or diagnostic information that could offer more insights into the issue would be extremely helpful for our analysis. |
This issue has not received a response in 1 week. If you still think there is a problem, please leave a comment to avoid the issue from automatically closing. |
. |
Checkboxes for prior research
Describe the bug
We are using the
@aws-sdk/client-sso-oidc
which looks to use@smithy/node-http-handler
. The core of the issue looks to be with@smithy/node-http-handler
.In the user telemetry of our products AWS Toolkit for VS Code and Amazon Q for VS Code, we sometimes see the error
TimeoutError
, with the messageConnection timed out after 0 ms
. It looks to be coming fromsetSocketTimeout
. In our attempt to fix this we set a value of30_000
in therequestTimeout
field which is eventually used here, and then we started to instead seeConnection timed out after 30000 ms
. This seems to validate that the problem is coming fromsetSocketTimeout
The docs say that the timeout should be disabled at 0ms.
SDK version number
Which JavaScript Runtime is this issue in?
Node.js
Details of the browser/Node.js/ReactNative version
20+
Reproduction Steps
Cannot reproduce myself as it is sporadic, we see it in user telemetry though.
Minimal steps from my guess would be to:
NodeHttpHandler
instance withrequestTimeout
at its default of 0My guess is that since the request has multiple chunks you will get a TimeoutError since it will timeout before the next chunk is sent???? Below in the Additional Context section it seems like the socketTimeout should reset when new chunks are received.
Observed Behavior
Unexpected
TimeoutError
Expected Behavior
Don't get a
TimeoutError
Possible Solution
It looks that in
setSocketTimeout
we still set the timeout even if it is 0. If we return early will this be enough to fix the issue?Additional Information/Context
setSocketTimeout()
essentially reset its timeout whenever there is socket activity. I didn't see obvious code from a quick read. Maybe this is a separate issue in itself.The text was updated successfully, but these errors were encountered: