Small MySQL Burp Today
Sorry to anyone that tried to access the site earlier today and got an error about "Too Many MySQL Connections". That one was my fault, as I had the connections that PHP makes to MySQL as persistent, which means that they are not closed when the script is finished executing. That shouldn't be a problem, as long as you close them manually. However, I hadn't closed them in some cases, which combined with a surge in traffic caused some issues. Which is a nice, thin veil to mention that today was the highest traffic day our site has ever had!
So the solution was to go through and use non-persistent connections (since even MySQL says that the advantages to persistent connections won't really show themselves for our site) where I could, and making sure to close persistent connections where they exist. In addition, a very helpful gentleman named PJ at our hosting company helped me out with the future by increasing the number of allowed connections (which is a configuration setting on the server) and also by enabling Query Caching, which allows MySQL to cached commonly used queries so that it will improve performance.
I think that things are working better than ever now. Once all the configuration changes were made I optimized all our tables just to be sure, and the site seems to be loading nice and fast. Please let me know if you are experiencing any problems.