Archive for the ‘Passenger’ Category

No need for touching restart.txt. A tip for Passenger users

Monday, February 2nd, 2009

Natham writes about this tip I found today. This one helps to speed up the deployment with Passenger a little bit. In your Capistrano, Vlad, etc, you probably have a step that runs:


touch tmp/restart.txt

This is needed, so Passenger (mod_rails) is able to know when it should restart itself. Now, think about this:

Commit “tmp/restart.txt” to your Git repository.

This way you’ll never have to touch tmp/restart.txt again. This will be deleted when Passenger notices it. And on the next deployment, it’ll be rewritten again, with your deploy script (Capistrano/etc), that probably runs something like “git reset; git pull”, and Passenger will notices again, restart. And so forth.

Clever, isn’t? :)

Source: A tip for Passenger(mod_rails) users by Nathan.