View Full Version : Max_User_conecctions
kaesar30
09-05-2007, 05:51 PM
I'm suffering a 'max_user_connections' active connections issue.
There are any way for close() or something to avoid this issue ?
Exist any code customization to allowed use New users ?
Something like this code
$dbusers = array(
array('user' => 'mysql_username_1', 'password' => 'mysql_password_1') // First MySQL user/password combination
, array('user' => 'mysql_username_2', 'password' => 'mysql_password_2') // Second MySQL user/password combination
, array('user' => 'mysql_username_3', 'password' => 'mysql_password_3') // Third MySQL user/password combination
);
$mysql_user = $dbusers[rand(0, count($dbusers) - 1)];
Maky70
09-05-2007, 08:23 PM
Vivvo should not be causing this problem. If you're running PHP as a CGI application, which means it cannot have pconnections (all connections are closed as soon as the page is sent), and the performance issues are revolving around the overhead of creating/destroying tasks...
If your host has set max user connections to a low figure (i.e. 25) then this might happens. In other words, if your server is set to 25 simultaneous page requests - each page makes ONE connection to the database, and it ends when the page is sent to the browser. You can serve hundreds of people, so long as no more than 25 requests are made at the same time.
The only way to keep people from seeing a "too many connections" error is to make sure that the web server is configured to allow no more than the number of database connections you are allowed. For example if you have 25 database connections available, then Apache should not accept more than 25 simultaneous web connections for your site.
If your host won't setup their servers in a reasonable way, then your only choice is to live with whatever they do , or change hosts. If you have any MODs installed, or other scripts running that access the database, then you can turn them off or uninstall them or whatever.
kaesar30
09-06-2007, 03:26 AM
I'm going to change host provider. How many max user conections do you recommend me to run propertly ? More than 100 ?
Regards
Maky70
09-06-2007, 10:54 AM
It all depends on your needs. My setting is 128; the default process is 25. Some sites are set to "-1" which means no limits!
As for hosting, I've tried a bunch of "big" names but never found better than HostICan (http://www.hostican.com/). Unmetered bandwidth, excellent hosting options, full featured CP, great support, latest Zend optimizer & IonCube runtime libs for PHP 5 & mySql 5, etc. For $11/month shared hosting-Tera Host (http://www.hostican.com/hosting/shared-hosting.php), you can host unlimited domains and get 500 GB of space in addition to the excellent standard features, and over all that they provide 30-day money back guarantee - no questions asked :D
vBulletin® v3.8.4, Copyright ©2000-2010, Jelsoft Enterprises Ltd.