Page 1 of 1

MySQL Connection Limit

PostPosted: Sun Mar 20, 2011 2:25 pm
by MobJuice
Hi

Thought you'd want to know about a little problem we keep hitting during peak times... usually around 800 concurrent users at present but we keep moving the goal posts and hitting new limits each week... so far it's all rectifiable via config but the error is very ungraceful and doesn't allow for us to redirect to our 'sweet' error page ;-)

Fatal error: Uncaught exception 'Exception' with message 'Error: ' in /xxxx/xxxx/xxxx/tera_wurfl_214/DatabaseConnectors/TeraWurflDatabase_MySQL5.php:354 Stack trace: #0 /xxxx/xxxx/xxxx/tera_wurfl_214/TeraWurfl.php(288): TeraWurflDatabase_MySQL5->getDeviceFromCache('TeraWurflSimple...') #1 /xxxx/xxxx/xxxx/xxxx/xxxx/xxxx(68): TeraWurfl->getDeviceCapabilitiesFromAgent('Mozilla/5.0 (Ma...') #2 /xxxx/xxxx/xxxx/xxxx/index.php(32): DetectDevice(NULL) #3 {main} thrown in /xxxx/xxxx/xxxx/xxxx/DatabaseConnectors/TeraWurflDatabase_MySQL5.php on line 354

Apparently you can catch it with the error code 1203 (too many connections). More details found here: http://dev.mysql.com/doc/refman/5.5/en/ ... tions.html

If you need any more info don't hesitate to ask...

Thanks

Arran

Re: MySQL Connection Limit

PostPosted: Wed Mar 23, 2011 12:22 am
by kamermans
Indeed, I will look for a more elegant way to handle the connection limit issue. If you are using PHP >= 5.3, these connections should be persistent via MySQLi, so hitting the max conn limit would be unlikely unless they are not being reused properly. Can you check your PHP version when you get a chance?

Re: MySQL Connection Limit

PostPosted: Fri Mar 25, 2011 1:26 pm
by MobJuice
Indeed... it's 5.2.17.