TimeoutError: Connection timed out after 120000ms
See original GitHub issueDescribe the bug
When I run serverless
command, after something like ~6 minutes, I get the following error:
TimeoutError: Connection timed out after 120000ms
api-lambda
folder size is 189MB
default-lambda
folder size is 100MB
To Reproduce
I just run serverless
.
Expected behavior Deployed successfully.
Screenshots
Desktop (please complete the following information):
- OS: Windows
- Version 10
Issue Analytics
- State:
- Created 3 years ago
- Reactions:3
- Comments:25 (3 by maintainers)
Top Results From Across the Web
occasionally connection timeout from lambda function
It seems that the lambda Node.JS runtime is keeping a socket alive during the lambda execution, which is higher than 120,000 ms (2...
Read more >Troubleshoot Lambda function retry and timeout issues when ...
Example error log where the API call connection was successful, but timed out after the API response took too long (socket timeout).
Read more >Serverless deploy - connection timedout after 120000ms
Hi, I'm trying to deploy a Lambda function using exactly the same code co-workers have successfully used from another network, ...
Read more >Upgrade to 4.5 and Active parallel loading / 30000ms timeout ...
Scheduled Data Model loads failed with request time out after 30000ms error. Error Code from the logs: Could not get JDBC Connection; nested...
Read more >Lambda Task Timed Out After X Seconds - Dashbird
The Dashbird app will show you the most recent errors in your AWS account. Figure 4 below shows a list that includes the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yup, no worries. For completeness sake, I forgot to mention you can also minimize your Next.js build outputs using something like this in
next.config.js
. It can be used instead ofuseServerlessTraceTarget
. This is what I use for production since I use the regularserverless
target: it makes the build take longer but my Lambda ZIP is ~20% smaller. Only caveat is by minimizing perhaps it’ll make it harder to debug if you don’t have useful error messaging or logging, as you can’t refer to line number in source code.(Use
terser-webpack-plugin
)I’ll close the issue for now and work on improving the docs/code in the near future.
@dphang Thank you for the time and the help! 💪