-
-
Notifications
You must be signed in to change notification settings - Fork 18
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
Allow to properly shutdown the PIP service #61
Comments
This script uses `exec` to ensure the PID of the script is the PID of the PIP service later. The Dockerfile is updated to use the script, so that containers can be shut down immediately by avoiding any intermediate processes that won't forward signals. See npm/npm#4603 Fixes #61
Hi @otbutz, |
Had a look at your pull request. It should work for the Docker image as the node process will receive all incoming signals but it won't fix the That's why i'd suggest an approach like this one: https://stackoverflow.com/a/39128820 The stop endpoint should only work for local connections. Edit: killing by process title should work too but requires additional commandline tools |
Ugh. That's clever, but a lot of extra complexity to add to all our services. We are not going to add that. I'd suggest you avoid |
The ability to create a pid file would also solve the problem and should be pretty straightforward to implement. |
There are a lot of problesm with PID files. I've worked with them at scale for many years and a lot can go wrong. As far as I know, the only really solid ways to run a service on a linux machine are to use a We'll add start scripts to circumvent |
I closed this issue because is merged #63, but if there are other solutions I'm missing, let me know :) |
I tested the following using the staging branch:
The result is that the
npm
process exits butnode
and the other PIP processes(empire
,country
, etc) keep running. (see npm/npm#4603)This also affects the docker image which is started with
npm start
aswell.My current workaround for this behaviour is to invoke node directly:
A separate stop script might be a cleaner solution though.
The text was updated successfully, but these errors were encountered: