Mongrel PID Issues

I finally got my app to deploy using Capistrano, but now I cannot get Mongrel to run on the server this is the error I keep getting:

!! PID file log/mongrel.8000.pid does not exist

I finally got my app to deploy using Capistrano, but now I cannot get Mongrel to run on the server this is the error I keep getting:

!! PID file log/mongrel.8000.pid does not exist

I found that the defaults for the location of the PID files seemed to differ between start and stop. I "solved" that problem by specifying the exact (relative) location of the pid file for both startup and shutdown. The parts of my /etc/init.d/mongrel file are below:

function startup() {      host=127.0.0.1      for port in 8000 8001 8002; do          mongrel_rails start --daemonize -e production --port $port -a $host --pid tmp/pids/mongrel.${port}.pid -c ${1:-$BASEDIR}      done }

function shutdown() {      cd ${1:-BASEDIR}      for pidfile in tmp/pids/mongrel*.pid; do          mongrel_rails stop --pid $pidfile -c ${1:-$BASEDIR}      done }

I hope this helps you. You might also look at mongrel-cluster (as I should one day) to manage a pack of mongrels.

-Rob

Rob Biedenharn http://agileconsultingllc.com Rob@AgileConsultingLLC.com