[Mongrel] why put .pid's in log instead of tmp?
don at jibjab.net
Tue May 8 11:15:43 EDT 2007
I beileve that pid files are release specific, as are the running
the problem you describe is when the capistrano recipe does an svn
update, shutdown, startup. the svn update replaces the directory tree
under the running processes. i imagine the reasoning was to minimize
downtime if the svn up is a time-consuming process.
a better order is to shutdown, svn up, startup. there is an
association between the running mongrels and the tmp/pids of the
release directory in which they started. let the running processes
shutdown in their own release directory, then replace the release
On May 7, 2007, at 11:55 PM, Eden Li wrote:
> One more reason -- in capistrano deployed setups, the log directory is
> shared among all releases, but the rails tmp directory is not. The
> default mongrel restart recipes will complain that they can't find pid
> files because the xxx/current/tmp will have been moved to a freshly
> checked-out version of your which doesn't have the old tmp directory
> from your previous deploy.
> You'd probably have to mess with your recipes if you're using
> capistrano, or make the tmp directory shared as well...
> On 5/8/07, Matte Edens <matte at ruckuswireless.com> wrote:
>> So just change your config files. Easy peasy.
>> Best practice, if using mongrel_cluster, is to throw it into a
>> like what you're suggesting. In the announcement thread for
>> mongrel_cluster 22.214.171.124 it's recommended to config for using the
>> /var/run directory. But you can choose what you want.
>> matte - matte at ruckuswireless.com
>> Doug Smith wrote:
>>> I have thought this as well -- but it's not just Mongrel that does
>>> this. Ferret's DRb server also puts the .pid file into the logs
>>> directory. I'd prefer a dedicated location myself.
>>> On 5/7/07, Matt Zukowski <mzukowski at urbacon.net> wrote:
>>>> Just out of curiosity, why does mongrel_rails by default put
>>>> its .pid
>>>> files in the log directory rather than in tmp or tmp/pids?
>>>> Putting them
>>>> in the log directory seems to me like a strange decision, since
>>>> not logs -- they're temporary state files.
>> Mongrel-users mailing list
>> Mongrel-users at rubyforge.org
> Mongrel-users mailing list
> Mongrel-users at rubyforge.org
More information about the Mongrel-users