Practical eCommerce

 

Small MySQL Burp Today

Author: Brian Getting
Publish Date: January 25, 2007
Blog: Developers' Corner
Tags: mysql, php

avatar

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.

Add a Bookmark: Add 'Small MySQL Burp Today' to Del.icio.us Digg 'Small MySQL Burp Today' on Digg.com Submit 'Small MySQL Burp Today' to reddit.com Blink 'Small MySQL Burp Today' Add 'Small MySQL Burp Today' to dzone Seed 'Small MySQL Burp Today' on Newsvine Add 'Small MySQL Burp Today' to Furl Add 'Small MySQL Burp Today' to Spurl Add 'Small MySQL Burp Today' on simpy.com Add 'Small MySQL Burp Today' to fark.com BlogMark 'Small MySQL Burp Today' Add 'Small MySQL Burp Today' to Yahoo! myweb2 Add 'Small MySQL Burp Today' to wists.com Stumble It!

0 Comments

Sign-up to receive EcommerceNotes, our acclaimed email newsletter.

View A Sample | Privacy

Bloggers Wanted

We’re looking for merchants and other ecommerce professionals to share their experiences with our readers. If this interests you, we invite you to contact us.

Inside Practical eCommerce