Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does Phusion Passenger restart gracefully when I touch restart.txt

Will it finish serving all current requests before it restarts?

like image 872
Greg Avatar asked Feb 04 '10 17:02

Greg


2 Answers

Short answer : yes !

In fact, it will allow current request to finish, and serve new request with new version. I am trying to find reference to this, but can't find any for the moment.

like image 185
tal Avatar answered Oct 21 '22 17:10

tal


I'm under the impression that each passenger app instance dies AFTER processing a request instead of restarting BEFORE the next request when restart.txt is touched. So there's a latency of one request in each passenger worker. As the process quits and the app spawner just spawns a new instance, I would not call this "graceful".

This means that the next request to a single instance of your application will be answered by that version of the instance which then quits (after doing its work). Current running requests won't be killed.

like image 21
hurikhan77 Avatar answered Oct 21 '22 16:10

hurikhan77