[Mongrel] why put .pid's in log instead of tmp?

Eden Li eden at mojiti.com
Tue May 8 02:55:33 EDT 2007

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 directory
> like what you're suggesting.  In the announcement thread for
> mongrel_cluster 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.
> >
> > Thanks,
> >
> > Doug
> >
> > 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 they're
> >> not logs -- they're temporary state files.
> >>
> >>
> _______________________________________________
> Mongrel-users mailing list
> Mongrel-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/mongrel-users

More information about the Mongrel-users mailing list