-
Notifications
You must be signed in to change notification settings - Fork 20
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
nginx processes are not cleaned up correctly in development #3
Comments
This is a problem, but not really a bug. Phusion Passenger responds correctly to SIGTERM and shuts down Nginx correctly. Foreman sends SIGTERM to Phusion Passenger correctly. The problem is that when pressing Ctrl-C in the terminal, SIGINT is sent by the operating system to all processes in the same terminal session. So when you press Ctrl-C, SIGINT is sent to Foreman and Phusion Passenger simultaneously. Phusion Passenger proceeds to stop Nginx. Foreman also attempts to stop Phusion Passenger by sending it SIGTERM, but it interrupts the Nginx stopping code instead, and so Nginx is never stopped. I'll have a look at making the Nginx stopping section of the code less interruptable. In the mean time, you can work around this problem by stopping Foreman by sending it a SIGTERM signal with |
👍 |
Fixed in commit b749690 of in Phusion Passenger. |
I installed from source |
I know this issue is a bit old but we are seeing a daily R12 (exit timeout) errors from Heroku. Seems like Passenger doesn't correctly react to https://devcenter.heroku.com/articles/dynos#graceful-shutdown-with-sigterm |
I'm also seeing 1-2 R12 errors daily on a few projects I switched over to Passenger on Heroku. |
Passenger responds fine to SIGTERM, but if during shutdown there are still active requests, it waits at most 30 seconds for the requests to finish. Heroku's shutdown timeout is only 10 seconds, and I don't know whether they abort requests before initiating shutdown. |
In development,
nginx
processes are not stopped when I Ctrl+C in foreman.Here's relevant vars from my
.env
:and
Procfile
:This is what happens:
There are two
nginx
processes still running after foreman exits that that I have to reap manually withActivity Monitor.app
orkill
.I'm on OS X 10.8.4.
The text was updated successfully, but these errors were encountered: