Can you reload the Rails app on Passenger in the same way that you reload it in Unicorn?

With Unicorn, you can reload and reload the Rails application with kill -USR2 [master process] , which does not immediately kill the process, but starts a new main process + subordinate processes in the background. When the new master is ready, you can disable the old master with kill -QUIT . This allows you to restart your website if visitors have not noticed a slowdown in request processing.

But with Passenger, you restart the Rails application with touch tmp/restart.txt , which, as far as I can tell, causes the Rails application to stop responding for several seconds to restart the Rails application.

Is there a way to use Passenger, but is it also easy to restart the Rails application?

+4
source share
2 answers

No. [now yes - see hongli response]

You ask to restart the reboot when new server processes are brought up before the old ones are killed. The passenger (free version) will not drop requests, but they will be queued and delayed at each deployment.

Restarting the restart is presumably already implemented and available in the licensed version, but not yet released for the free version. I was not able to figure out how to get a licensed version.

Follow this google groups list for more info:

https://groups.google.com/forum/#!msg/phusion-passenger/hNvU-ZE7_WY/gOF9XWmhHy0J

You can try to start two autonomous passenger processes and manually bring one while the other remains, but I do not think the answer you were looking for.

+1
source

Restart restart is available in Phusion Passenger Enterprise .

This is the “licensed version” that Klochner talked about, but it was not released until August. Phusion Passenger Enterprise fully automates restart restarts (Unicorn requires some manual scripts to make restart restarts a good way). It also includes many other useful features such as deployment error tolerance, live IRB console, etc.

+2
source

Source: https://habr.com/ru/post/1391623/


All Articles