-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Random timeout while invoking long running lambda (cont.) #3762
Comments
Hi @michaeltarleton thanks for reaching out. Are you still experiencing this with the latest version of the SDK? |
I have since changed companies but at the time I left this was still an issue. |
Feel free to reopen this issue if the problem is still persisting with the latest version of SDK. |
turns out it's a problem with node itself, not the aws sdk. @michaeltarleton and all others impacted by this bug - there's a simple hack you can use to avoid this issue: complete a guaranteed fast request with the client, before attempting the >5 minute request. e.g. if there's a lambda invoke that may take >5 minutes, first use the client to make an invoke request with the DryRun parameter set to true, then attempt the >5 minute invoke.
this works because the keepalive parameters are not applied until after the first request is completed. you can see it in this code - state.keepAliveTimeoutSet = true; I highly recommend adding this workaround to your code - bnoordhuis mentions that this is intended behavior in node, so there's no guarantee it will ever be fixed:
|
Confirm by changing [ ] to [x] below to ensure that it's a bug:
Describe the bug
Hi,
We are having this random timeout problem in our amazon Lambda that runs a node script that in turn uses aws-sdk (2.706.0) to invoke another lambda which takes ~6min.
Our lambda 1 will randomly timeout after 15 mins (900s) despite the lambda 2 having a log saying it ran successfully:
So looks like Lambda 2 completes successfully but Lambda 1 never gets the response (only if Lambda 2 takes ~6 mins or longer).
(seems to be related to #2558)
Is the issue in the browser/Node.js?
Node.js
If on Node.js, are you running this on AWS Lambda?
Details of the browser/Node.js version
Node 12_x (using cloudformation through CDK)
SDK version number
Example: v2.706.0
To Reproduce (observed behavior)
Expected behavior
Lambda 1 should get the success response from Lambda 2.
Additional context
We have tried:
The text was updated successfully, but these errors were encountered: