I run a website with fairly high traffic. I've been having a lot of issues lately with "too many connections" or "could not connect" to MySQL and I think it's because of bots but I'm not 100% positive. I connect to the database using one username. So anyone who visits the site connects with the same script (and MySQL user).
If I have 1,000 people on the site at one time and I
show processlist, the
threads_connected is always
1. Is that normal? Could this be the cause of the too many connections issue?
The strange thing is, I can have 20,000 people on the site and it runs fine. But MySQL has been crashing a lot lately with an average of 200 people on the site - which my Amazon instance can EASILY handle. And there are always bots in the
access_log when it goes down. I have tried so many things to stop MySQL from crashing and nothing is working.