Go Back   HostGator Peer Support Forums > HostGator Announcements > Network Status

Notices

Reply
 
Thread Tools
  #1  
Old 05-25-2005, 09:26 PM
Nathan Malone Nathan Malone is offline
Hatchling Croc
 
Join Date: Mar 2005
Location: Austin, Texas, USA
Posts: 4
Default max_user_connections / Mysql Errors?

I'm getting an error message on one of my sites that says the following:

Code:
Warning: mysql_connect(): User asdf_user has already more than 'max_user_connections' active connections in /home/asdf/public_html/forum/db/mysql4.php on line 48
Is this something that I am doing wrong (it's a phpBB forum) or is it just a temporary server error?
Reply With Quote
  #2  
Old 05-25-2005, 10:41 PM
GatorBrent's Avatar
GatorBrent GatorBrent is offline
HostGator Staff
 
Join Date: Oct 2002
Location: houston, texas
Posts: 3,006
Default Re: max_user_connections / Mysql Errors?

the error means you are having more than 20 sql connections in few seconds period. I would take a look at your coding there is most likely some type of problem.
__________________
Gators love marshmallows.
Reply With Quote
  #3  
Old 05-26-2005, 04:39 AM
Andeavour's Avatar
Andeavour Andeavour is offline
Hatchling Croc
 
Join Date: Mar 2005
Posts: 39
Default Re: max_user_connections / Mysql Errors?

Two of my clients running osCommerce have started getting the exact same error this morning. One of the sites has been running happily for weeks, the other for months without producing any errors.
Reply With Quote
  #4  
Old 05-26-2005, 06:27 AM
Nathan Malone Nathan Malone is offline
Hatchling Croc
 
Join Date: Mar 2005
Location: Austin, Texas, USA
Posts: 4
Default Re: max_user_connections / Mysql Errors?

Quote:
Originally Posted by GatorBrent
the error means you are having more than 20 sql connections in few seconds period. I would take a look at your coding there is most likely some type of problem.
Everything's working now but I'll check out the coding again to see if there is anything that I can improve.

BTW, this is the first server-related error I have gotten since switching to HostGator and it isn't even necessarily a problem with the server. I have been very pleased with the hosting / support here...
Reply With Quote
  #5  
Old 05-26-2005, 06:36 AM
Andeavour's Avatar
Andeavour Andeavour is offline
Hatchling Croc
 
Join Date: Mar 2005
Posts: 39
Default Re: max_user_connections / Mysql Errors?

I have had no problems with Hostgator prior to this... The two sites having the problem are the only 2 sites (out of over 50 we host with Hostgator) that are having a problem, and they are also the only 2 running the CRELoaded version of osCommerce rather than the standard version.

Brent, would it be possible to up the max_connections in php.ini to 100 to try and clear this problem. It may be that the CRELoaded model requires more than 20 concurrnet connections?

I should point out that the sites in question only recently switched to the CRELoaded installation of osCommerce.

Last edited by Andeavour; 05-26-2005 at 07:09 AM. Reason: Additional information
Reply With Quote
  #6  
Old 05-26-2005, 09:50 AM
amartins's Avatar
amartins amartins is offline
Royal Croc
 
Join Date: Dec 2003
Location: Europe
Posts: 415
Default Re: max_user_connections / Mysql Errors?

Dunno much about that version of OSCommerce but could this issue possibly have anything to do with persistent connections being enabled? I recall the setup mentioning that that would not be an appropriate choice for shared servers.

Antonio
Reply With Quote
  #7  
Old 05-26-2005, 03:27 PM
Andeavour's Avatar
Andeavour Andeavour is offline
Hatchling Croc
 
Join Date: Mar 2005
Posts: 39
Default Re: max_user_connections / Mysql Errors?

With the help of Chad at Hostgator we got it sorted. He restarted the MySQL service to clear out the connections and I got the client to disable persistant connections.
I'd just like to thank Chad for his help as the client in question actually found Hostgator's number and rang them direct whilst I was on LiveChat trying to get things sorted, and I believe spoke to Chad (ironic eh?).
Reply With Quote
  #8  
Old 06-11-2005, 01:59 AM
o0CAPPI0o o0CAPPI0o is offline
Baby Croc
 
Join Date: Mar 2004
Posts: 52
Default Re: max_user_connections / Mysql Errors?

Hiya i and another site simular to mine are also getting these errors i thought creating new usernames to the databases would resolve the issue and it did for a little while but the problem is back, like yourselves i have had my hostgator package and my site online now for over a year it must be and this is the first time this has become a problem, if i need to disable this "allow persistant connections" where can i find it? i dont remember seeing it anywhere on my site or in cpanel also is this a result of something recently being implimented with Hostgator?

all help greatly appreciated
Reply With Quote
  #9  
Old 06-11-2005, 06:39 AM
amartins's Avatar
amartins amartins is offline
Royal Croc
 
Join Date: Dec 2003
Location: Europe
Posts: 415
Thumbs up Re: max_user_connections / Mysql Errors?

in your config file for OSCommerce edit from true to false like so:

define('USE_PCONNECT', 'false');


HTH

Antonio

Last edited by amartins; 06-11-2005 at 06:39 AM. Reason: including code
Reply With Quote
  #10  
Old 06-11-2005, 08:50 AM
o0CAPPI0o o0CAPPI0o is offline
Baby Croc
 
Join Date: Mar 2004
Posts: 52
Default Re: max_user_connections / Mysql Errors?

as far as i know i do not have that module installed, i am running phpnuke platinum (7.6) i cannot see OSCommerce in the modules list anywhere
Reply With Quote
  #11  
Old 06-11-2005, 09:13 AM
amartins's Avatar
amartins amartins is offline
Royal Croc
 
Join Date: Dec 2003
Location: Europe
Posts: 415
Default Re: max_user_connections / Mysql Errors?

Sorry my mistake, this threas mentioned OSCommerce so I assumed that was your issue too.

You need to check on ther error message you get to pinpoint if it's a module or phpnuke itself.. maybe if you showed your error message more help would be forthcomming.

Antonio
Reply With Quote
  #12  
Old 09-07-2005, 10:01 AM
vtrain's Avatar
vtrain vtrain is offline
Royal Croc
 
Join Date: Jan 2004
Location: Melbourne - Australia
Posts: 704
Default Re: max_user_connections / Mysql Errors?

How do I check if i-m using persistent mysql connecting with phpBB?
I'm using a default instalation ... so i think it shouldn't but...

cheers,
__________________
Vtrain is Linux User #237333 on http://counter.li.org/
"Don't meddle in the affairs of sysadmins,
for they are subtle and quick to anger."
Reply With Quote
  #13  
Old 09-10-2005, 07:28 PM
dannydp dannydp is offline
Hatchling Croc
 
Join Date: Jan 2005
Posts: 4
Default Re: max_user_connections / Mysql Errors?

I am not getting this on all of my accounts on bentley. Definetly not a issue with the accounts more likely one with the total limit
Reply With Quote
  #14  
Old 09-15-2005, 06:22 PM
oats oats is offline
Hatchling Croc
 
Join Date: Mar 2004
Posts: 22
Default Re: max_user_connections / Mysql Errors?

I read somewhere else that Hostgator had reduced the number of concurrent connections allowed as a protection against something (can't remember what now).

I had the same problem in a site with a phpbb (so will happen in a nuke too). It IS to do with persistent connections. If you can spot the error being displayed it will show you which file (and possibly even line number) where the error occurs. You will see something like the error in the original post "home/asdf/public_html/forum/db/mysql4.php on line 48" but this goes on to show something with 'pconnect' in it.

You need to open that file and change the 'pconnect' to 'connect'. This drops the connection (i.e. NOT persistent) as soon as the user logs out, so should cure the problem.

I found 2 files with this in them over a couple of weeks. Once I made the changes the problem cleared. You may need to ask Hostgator to restart MySQL after you have fixed the problems (probably essential in fact, but it's no big deal - they'll do it if you tell them you've just fixed some code to clear the persistent connection problem).

If you can't see the file or line number in the error message do a search in ftp for 'pconnect'. If you know the right file you'll fix the problem in less than a minute. If you have to check all/lots of files it'll be a bit of a drag obviously, but it WILL work.
Reply With Quote
  #15  
Old 11-23-2006, 03:41 PM
Unregistered
HostGator Guest
 
Posts: n/a
Default Re: max_user_connections / Mysql Errors?

I got this error aswell, on linerider.org
Reply With Quote
  #16  
Old 02-14-2008, 05:15 PM
PAGENET PAGENET is offline
Hatchling Croc
 
Join Date: Feb 2008
Posts: 1
Default Re: max_user_connections / Mysql Errors?

It appears MAX_USER_CONNECTIONS is limited to 25 at HostGator.

According to vBulletin.com, this is an extremely low limit. Most hosts are set at 100 and some you can find set to 500.

Even with persistent connections turned off, my forum is showing errors.
Reply With Quote
  #17  
Old 03-28-2011, 08:41 AM
phixar
HostGator Guest
 
Posts: n/a
Default Re: max_user_connections / Mysql Errors?

Same problem here with a CMS Made Simple site. I had it with another provider and the client wanted to move to HostGator, as soon as we moved the max_user_connections error started showing. With the previous provider this error never showed.
I have a dedicated server so I presume I can set this value at my discretion, just don't now where to set it in the WHM or the cPanel. Anybody have any ideas?
Reply With Quote
Reply

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Escape: mysql_connect(): Can't connect to local MySQL server through socket RyanM Shared Hosting Support 6 10-02-2006 05:45 PM
xeoman guestbook/ mysql help needed marlies63 Shared Hosting Support 2 01-31-2005 02:42 PM
MySql Database Connection Errors mortgage-pro-seo Shared Hosting Support 3 01-28-2005 04:31 AM

All times are GMT -5. The time now is 02:24 PM.