MySQL Forums
Forum List  »  General

Re: mysql max_connections
Posted by: Rick James
Date: December 25, 2009 11:12PM

I doubt if you are really using more than a few dozen Apache children. Also, I suspect that Apache would grind to a halt if it had anywhere near 400 actions in progress at once. What happens is that the Apache children fight for resources (CPU or core or disk or mysql or whatever) and all the children slow down. This leads to poor response time for each user.

I rarely see an Apache server that is doing nontrivial stuff need more than 30 for MaxClients.

What activity do you have other than from Apache? (I would expect very few.)

Does web page need more than one connection to MySQL? (I would expect not.)

So, max_connections does not need to be more than a few more than Apache's MaxClients.

Similarly, if you have lots (say, 400) MySQL clients all hitting the same table, response will be not just poor, but terrible.

Do SHOW PROCESSLIST. How many processes are
* "Sleep" -- that is, waiting for the UI to issue another query.
* "Locked" -- that is, blocked on resources (probably a table lock in MyISAM).
* or doing something useful.

Options: ReplyQuote


Subject
Written By
Posted
December 11, 2009 01:26AM
December 12, 2009 03:56PM
December 16, 2009 11:59PM
December 17, 2009 12:39AM
December 20, 2009 11:39PM
December 22, 2009 12:37AM
December 24, 2009 02:01PM
December 25, 2009 12:49AM
December 25, 2009 03:30AM
December 25, 2009 03:49AM
Re: mysql max_connections
December 25, 2009 11:12PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.