Troubleshooting Tips
When something doesn’t work, a good way to figure it out is to run various daemon processes in foreground mode with verbose logging. Here is how:
1. Stop everything. Simply killing processes isn’t good enough, because runit will immediately respawn them. You can stop Mongrel instances and HAProxy with monit (of course, you can start or restart them in similar way) :
sudo monit stop|start|restart \
haproxy|mongrel_3002|mongrel_3003|mongrel_3004|mongrel_3005
Note: you can’t stop monit with monit itself. Therefore, you manage monit through runit:
sudo /usr/sbin/sv stop|start|restart monit
Why is it not possible to stop Mongrel and HAProxy with runit? Because monit will start them again after a while (15 seconds by default). You should always manage these services via monit.
# this doesn't work: mongrel_3002 will be restarted 15 seconds later
sudo /usr/sbin/sv stop mongrel_3002
2. Run monit, HAProxy and Mongrel in foreground mode with verbose output:
sudo monit -Iv
haproxy -d -f /etc/rails/haproxy.conf
cd /usr/rails/; script/server -e production -p 3002
Brace yourself for a lot of output.
3. If it’s really hard to figure out the problem and/or the solution, you can always look for help from the community at rubyworks-users maillist.
4. If you need more responsive and effective support, ThoughtWorks offers paid, 24×7 support for this stack.
