pstrid Posted January 18, 2005 Posted January 18, 2005 I am getting the following message on my live site: Warning: mysql_connect(): User commerce has already more than 'max_user_connections' active connections in /home/www/saludmadrid/includes/functions/database.php on line 19 Unable to connect to database server! and am not sure why...i think Yahoo/Inktomi crawl is casuing it but not sure. Please help!
Guest Posted January 18, 2005 Posted January 18, 2005 ask your host to restart mysql for you. could be your host has a tight limitation on the # of connections/users. do you have persistent connection set to true?
pstrid Posted January 18, 2005 Author Posted January 18, 2005 Usually within a few minutes i can connect to the dB...i assume this is because the connections/users eventually "lessen" gradually as the site is down. I would hope that our hosting company (Hostway) wouldn't have too tight a limitation on the # of connections/users but I will confirm with them. We only have a relatively small site with 10-20 users connected at any one given time. Still think it is most likely a hosting problem? I have persistent connections set to false. define('USE_PCONNECT', 'false'); // use persistent connections? Should I set to true? Also, i just installed the 'cName and pName' contribution recently and then these problems surfaced..maybe that's it?
qorn Posted January 18, 2005 Posted January 18, 2005 Try using FALSE as this can help with the problem and ask your hosting company to up the max sql users or just simply go your seperate ways from your hosting provider Kind Regards Dave My Contributions
pstrid Posted January 21, 2005 Author Posted January 21, 2005 Try using FALSE as this can help with the problem and ask your hosting company to up the max sql users or just simply go your seperate ways from your hosting provider Kind Regards Dave <{POST_SNAPBACK}> After speaking with my hosting provider, I am limited to 20 simultaneous connections becasue i am on a shared server. There solution was to move to a dedicated server. Unfortunately, that does make economic sense for us right now. For the time being, is there a way to decrease the amount of time before a session/connection times out so inactive sessions don't "tie up" the number of dB connections?
pstrid Posted February 1, 2005 Author Posted February 1, 2005 Still battling this issue and it seems most hosting providers i have looked at put a pretty tight restriction on the # of simultaneous user conneting to dB when on a shared server....for instance Pair networks ahs a 15 user limit. Anyone else dealing with this. I do have persistent connections set to 'false'. Any way to... For the time being, is there a way to decrease the amount of time before a session/connection times out so inactive sessions don't "tie up" the number of dB connections? Suggestions eagerly wanted. Thanks.
♥Vger Posted February 1, 2005 Posted February 1, 2005 Inbetween shared and dedicated servers you'll find Virtual Dedicated Servers, which give you full chroot access and allows you to set the maximum number of connections via your httpd.conf file. Vger
pstrid Posted December 20, 2005 Author Posted December 20, 2005 Just wanted to followup on this issue... I kept having this problem even though I set both admin and catalog config.php files to: define('USE_PCONNECT', 'false') Then I was loooking at the server info page on admin and noticed: mysql.allow_persistent = on To truely 'turn off' persisent connections you need to add the following to your php.ini file ; Allow or prevent persistent links. mysql.allow_persistent=Off (For newbies, you will find this file in your cgi-bin directory on your server but be careful if start making changes) If you then check the server info page, it should be set to = off. Worked for me...no more connection error messages. One question though...i have read up on the persistent vs non-persistent dB connections debate and wondering if anyone had any thoughts/comments on what i have done? Hope this info helps someone.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.