-
Notifications
You must be signed in to change notification settings - Fork 0
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
Gracefully close server connections on SIGTERM. #11
base: master
Are you sure you want to change the base?
Conversation
This will only help if the connection closes in < 10s right? Long downloads may take several minutes. This helps, just not a whole lot. We may want to look into server buffering in Nginx to see if that lets us close the server connection before the client is finished receiving data. Otherwise the only other alternative is to do proper graceful restarts by sharing a UNIX socket. |
LGTM |
I think your assessment of the situation is correct. Honestly, there are a number of things that I'm not entirely.
|
e2e3206
to
9aeba7d
Compare
|
👍 |
To do the forking with the unix socket, it sounds like you'd need more than one or two lines of logic for that. I'm thinking there's probably a module for that. (maybe forever?) I'll look into it. |
This should make it a little safer to restart the server.
relevant:
http://joseoncode.com/2014/07/21/graceful-shutdown-in-node-dot-js/
expressjs/express#1366