Lars Pind

internet software, coaching, and entrepreneurship

Lars Pind - internet software, coaching, and entrepreneurship
Check out Coach TV, my video blog on happiness and personal development for geeks.

[Rails] What to do about "Too many connections"

February 16, 2006 · See comments

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.

blog comments powered by Disqus

Comments ↓

  • 1 Mark Aufflick // Feb 22, 2006 at 02:58 AM

    I have used mysql for two projects in my entire career, and that's two too many ;)
  • 2 Mark Aufflick // Feb 22, 2006 at 03:00 AM

    Further to your recent post, a rock solid RDBMS is, in my opinion, not one of those things that "just doesn't matter".