[Rails] What to do about "Too many connections"
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.
About Calvin Correli
I've spent the last 17 years learning, growing, healing, and discovering who I truly am, so that I'm now living every day aligned with my life's purpose.
2 comments
Leave a comment