Back
[Rails] What to do about "Too many connections"
Other·Calvin Correli·Feb 16, 2006· 1 minutes

What do you do when MySQL complains about “Too many connections”? It seems you can just restart mysql (/etc/init.d/mysql restart), and the Rails processes will simply establish new connections transparently, with no requests lost at all.

This happens every few months for me. It seems that when I use switchtower to reap my FastCGI processes, they’ll leave the connections behind. Not sure if there’s a way to make them close them first, or if it only happens when a process crashes.