question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Socket does not exit - Attempt to listen on socket, aws-serverless-express will restart the Node.js server

See original GitHub issue

I am getting a warning when I make requests against my aws-serverless-express server. I run the server using the serverless offline plugin as well. The warning reads as follows: WARNING: Attempting to listen on socket /tmp/server0.sock, but it is already in use. This is likely as a result of a previous invocation error or timeout. Check the logs for the invocation(s) immediately prior to this for root cause, and consider increasing the timeout and/or cpu/memory allocation if this is purely as a result of a timeout. aws-serverless-express will restart the Node.js server listening on a new port and continue with this request. Any ideas what’s happening here? Each further request I make, the socket error increments, so if I’ve made two requests I get two warnings, if I make three requests I have three warnings and so on…

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:8

github_iconTop GitHub Comments

3reactions
brettstackcommented, Feb 9, 2018

Fixed in v3.1.1

0reactions
Alex-Manncommented, Oct 31, 2017

@jeremygiberson thanks for this.

@munkyjunky I have temporarily adopted serverless-http and it works well with serverless-offline.

If I have some time I will look into how they work with closing sockets and see if there is something that can be inspired to work with this package.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Attempt to listen on socket, aws-serverless-express will restart ...
I am getting a warning when I make requests against my aws-serverless-express server. I run the server using the serverless offline plugin ...
Read more >
Make node.js not exit on error - Stack Overflow
Attempting to resume application code without properly recovering from the exception can cause additional unforeseen and unpredictable issues. Exceptions thrown ...
Read more >
Going Serverless: Migrating an Express Application to ... - AWS
This command creates the Amazon S3 bucket specified earlier (if it does not yet exist); zips the necessary files and directories for your...
Read more >
Net | Node.js v19.3.0 Documentation
Start a server listening for connections on a given handle that has already been bound to a port, a Unix domain socket, or...
Read more >
How to use Server function in 1/http - Tabnine
server.on('connect', function(req, socket) { var tunnelUrl = 'tunnel://' + ... aws-serverless-express will restart the Node.js server listening on a new ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found