-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi
I have a mySQL database thats taking a bit of a hammering - enough so that the number of connections spirals up and out of control. max_connections was originally at the default of 100 - but rising above 50 or so meant actual throughput dropped so the db never got a chance to keep up (meaning manually restarting the db). I've lowered max_connections to 40 which at least keeps the db alive. But, the number of connections keeps rising to and bouncing off this limit - and for the users that hit it a 'Too many connections' error is given. Now, I've optimised all the tables and queries as much as is humanely possible - - and the only way out I can see so far is to have some kind of connection queue to keep people waiting for the 1/2 second or so until the load spike drops off (I'd rather have a few slow pages than errors any day). Is there any way of doing this - I've looked at back_log (the listen() backlog), but that doesnt really apply. Short of writing a 'hide-warning-wait-a-bit-and-try-again' chunk in PHP (sucky!) I'm stuck! Using persistent connections doesn't stunningly help either - it only gives a small performance increase. If it makes any odds, the SQL only talks to 3 tables, all are properly indexed and there's enough RAM to keep it all from swapping. Any help appreciated, thanks. - -- Shane http://www.shanewright.co.uk/ Public key: http://www.shanewright.co.uk/files/public_key.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.7 (GNU/Linux) iD8DBQE9Rosv5DXg6dCMBrQRAkMXAKCvGx8mYNEJoUPobtI093amT6RHAACcD3za xMUz0AP1fcMxJoZZdO0BixY= =zBoX -----END PGP SIGNATURE----- --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php