[Mongrel] Fails to restart mongrel cluster after Capistrano rollback (PIDs not deleted)
casper at lol.dk
Tue Sep 11 03:31:11 EDT 2007
That does the trick for me! I simply added this:
task :rollback do
On 07/09/2007, at 18:15, Wayne E. Seguin wrote:
> 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 /
>> 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
> 2. Rollback
> 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
> Mongrel-users mailing list
> Mongrel-users at rubyforge.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Mongrel-users