Niall Mullally wrote: > Hi, > One of my site's servers had a problem yesterday and the host > restarted it. During boot up Mongrel failed to start as the PID files > still existed in /log > > I didn't find out about this reboot until several hours later so the > site was down that entire time which is less than ideal. > > Does anybody know of a way around this? Is there a built in way to > force Mongrel to start and overwrite any existing PID files? > > I have the mongrel_cluster startup script setup correctly btw. > > Thanks in advance. > > Regards, > > Niall Mullally
On a related note. A script like this will kill any mongrel instance that is hanging around after its pid file is gone. #!/usr/local/bin/ruby # 3000 is the port you wish to kill. pid = `lsof -i :3000`.split("\n")[1].split()[1] rescue nil %x{kill -9 #{pid}} unless pid.nil? -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Deploying Rails" group. To post to this group, send email to rubyonrails-deployment@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/rubyonrails-deployment?hl=en -~----------~----~----~----~------~----~------~--~---