Enzo_UK Posted September 15, 2005 Share Posted September 15, 2005 Just tried to go on my site today and got this.... Warning: mysql_connect(): Lost connection to MySQL server during query in /home/v/w/URLREMOVED/includes/functions/database.php on line 19Unable to connect to database server! This is the first time its done this, never had any problems since I made the site in March. Anyone got any ideas whats happened? Is it because the site is getting alot more visitors now, and the hosting company has a limit on the number of connections to the DB? I havent made any changes to the site, so dont think its anything I have done, as it was working last night as had a few orders. I cant do anything, cant go on the site itself, cant use oscommerce admin, or phpmyadmin. Any help or ideas are greatly appreciated. Link to comment Share on other sites More sharing options...
Guest Posted September 15, 2005 Share Posted September 15, 2005 yes if there more connections than the host can handle you could get this problem. You could add some error handling and redirect to an html page would be a bit better. Link to comment Share on other sites More sharing options...
roughrider Posted September 27, 2005 Share Posted September 27, 2005 Is this error also down to my server? The same as Enzo, everything has been working fine until I switched on this morning. Warning: mysql_connect(): Too many connections in /home/httpd/vhosts/motorcycleproducts.co.uk/httpdocs/catalogue/includes/functions/database.php on line 19 Unable to connect to database server! Ride It Like You Stole It Link to comment Share on other sites More sharing options...
Guest Posted September 27, 2005 Share Posted September 27, 2005 there is a limit to the number of concurrent connections. Yes its down to the hosting server and how many connections he allows/handles at the same time. Default is 100 I think for mysql then there is an environment var that defines it in the main config file. set-variable=max_connections=100 You may also see this error if you open persistent connections that arent closed. (like if the script hangs in the middle) Also make sure in your configure files define('USE_PCONNECT', 'false'); // use persistent connections? is set to false like above Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.