AWS Lambda timing out due to open socket.
See original GitHub issueWe are currently using your library in some of our AWS Lambda functions.
The way we use it is as a Stream in our bunyan logger. Even though everything seems to be working fine, and the logs reach our backend log aggregator servers, the Lambdas keep timing ou 100% of the time.
setting
context.callbackWaitsForEmptyEventLoop = false
seems to help to get rid of the timeouts, however the logs stop being sent to the backend.
We haven’t nailed down the issue 100% but it seems very likely that the timeouts are happening because of your library leaving connections/sockets open.
Can someone please advise?
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
Troubleshoot Lambda function retry and timeout issues ... - AWS
There are three reasons why retry and timeout issues occur when invoking a Lambda function with an AWS SDK:.
Read more >AWS lambda Java open http socket times out - Stack Overflow
There is nothing in the role or permission-related to sockets. Don't be so sure it isn't the site -- the source address will...
Read more >preauthentication invocation failed due to error socket timeout ...
Verify that your Lambda function is timing out. Retrieve the request IDs of any timed-out invocations by searching the function's Amazon CloudWatch log...
Read more >AWS Lambda Timeout Best Practices - Lumigo
If you work on a serverless project, you have probably run into the issue of AWS Lambda timeouts handling. Lambda functions are short...
Read more >How to overcome API Gateway timeouts using WebSocket
A how-to guide on integrating WebSocket into a Serverless Framework based AWS Lambda backend. A while ago, one of our clients asked us...
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
Yes. We can wait ack response from Fluentd with
requireAckResponse: true
option.sender.end()
w/o parameters will close socket immediately.#91 is relevant to this issue.