[Mongrel] Fails to restart mongrel cluster after Capistrano rollback (PIDs not deleted)
Wayne E. Seguin
wayneeseguin at gmail.com
Fri Sep 7 12:15:34 EDT 2007
On Sep 07, 2007, at 03:30 , Casper Fabricius wrote:
> I am deploying a Rails website using Capistrano to a VPS running the
> site through Apache and Mongrel.
> 'cap deploy' works fine, and mongrels are restarted. When I execute
> 'cap deploy:rollback', however, my script fails to restart the
> mongrels giving this error:
> !!! PID file tmp/pids/mongrel.5000.pid already exists. Mongrel could
> be running already. Check your log/mongrel.5000.log for errors.
> I have a hunch that the error is related to the fact that I link /tmp/
> pids into the shared directory upon each release in the
> "after_update" task, but I'm not sure how I end up with this problem,
> as the old dir I'm rolling back also has the link setup. The mongrels
> are stopped, but for some reason they don't clean up their PID files,
> and thus they fail to start again.
> The full output of the rollback looks like this:
> My deploy.rb looks like this:
> Any help on this issue would be appreciated - thanks!
> Best regards,
> Casper Fabricius
I'd rewrite the default rollback task to:
1. Stop mongrel cluster
3. Restart mongrel cluster
Between 2-3 you might also want to ensure that the new (old)
"current" directory links the pid directory correctly.
Wayne E. Seguin
Sr. Systems Architect & Systems Administrator
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Mongrel-users