Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

max user connections


baggers

Recommended Posts

Posted

Hi all,

 

Occasionally, I am getting this message below when I try to log on to my site. It seems to be consistent this afternoon.

 

"Warning: mysql_connect(): User toysbuymail@localhost has already more than 'max_user_connections' active connections in /home/t/o/toysbuymail/public_html/area51/includes/functions/database.php on line 19

Unable to connect to database server!"

 

So presumably, I can just alter the amount of max connections to let more people on the site. Is it as simple as that, and if so, how do I change it. If not, what else could be done about it?

 

Thanks,

 

Paul

Posted
Hi all,

 

Occasionally, I am getting this message below when I try to log on to my site. It seems to be consistent this afternoon.

 

"Warning: mysql_connect(): User toysbuymail@localhost has already more than 'max_user_connections' active connections in /home/t/o/toysbuymail/public_html/area51/includes/functions/database.php on line 19

Unable to connect to database server!"

 

So presumably, I can just alter the amount of max connections to let more people on the site. Is it as simple as that, and if so, how do I change it. If not, what else could be done about it?

 

Thanks,

 

Paul

 

 

Are you running on a shared server? Normally this message appears when the hosting company has limited the number of simoultaneos connections to MySQL. (my ex host would only allow 20).

If yu have a dedicated server you can change it in the mysql config file, otherwise youll have to ask your host to change it.

Posted

Usually a sign that you are going to need to change hosting companies...

The Knowledge Base is a wonderful thing.

Do you have a problem? Have you checked out Common Problems?

There are many very useful osC Contributions

Are you having trouble with a installed contribution? Have you checked out the support thread found Here

BACKUP BACKUP BACKUP!!! You did backup, right??

Posted

It is on a shared server.

 

My configure.php file has 'USE_PCONNECT' set to false, however, as this is what is on line 19 of the database.php file above, has this got something to do with the message? Although, I distinctly remember, when installing, that for shared servers, this should be set to false.

 

Paul

Posted
It is on a shared server.

 

My configure.php file has 'USE_PCONNECT' set to false, however, as this is what is on line 19 of the database.php file above, has this got something to do with the message? Although, I distinctly remember, when installing, that for shared servers, this should be set to false.

 

Paul

 

 

You will see line 19 anytime osC is not able to connect to the database. The file however is not the problem as you always get a reason for the problem in the message. Most of the time you see a user/password error but in your case your hosting company has limited your access to the database for too much use. Are you getting A LOT!! more traffic than you normally will be getting when this happened?? If not then this will be an ongoing problem and you will need to either get your hosting company to increase your limits or you will need to rethink your hosting arrangments.

The Knowledge Base is a wonderful thing.

Do you have a problem? Have you checked out Common Problems?

There are many very useful osC Contributions

Are you having trouble with a installed contribution? Have you checked out the support thread found Here

BACKUP BACKUP BACKUP!!! You did backup, right??

Posted

I've had a messae from my ISP saying "Mysql will handle 100 concurrent connections, this is a global setting rather

than per database."

 

What does this mean?

 

Paul

Posted

If your host allows more than one MySQL user the simple answer is to create other accounts and then select one at random on each connection. As an example, if your host allows 5 users then your effective limit will be 100 x 5 = 500.

Posted

Do you mean like distributing the traffic through mirror sites? Such as

 

www1.myserver.com

www2.myserver.com

www3.myserver.com

etc.

 

Paul

  • 5 months later...
Posted

I am getting the same problem on my shared server. I sent an email to the hosting company and the reply I got was:

Hello Dave,

 

Due to security reasons and to ensure that all the users in the server recieves the same amount of resources, the maximum number of connections has been set to an optimum value. We would, hence, like you to alter the code so that the resource usage or mysql queries are not as high as this.

 

If you have any further questions, please feel free to contact us.

 

Best Regards,

Daniel

Unlimited-Space.com

[email protected]

 

I don't know much about how those connections work but what would be a polite reply to tell them to eat shit?

 

Is it easily possible to change the OSC code so the number of queries aren't as high? It is becoming quite a bad problem.

 

Thanks for any help

Posted

the error i'm getting says line 17?

Warning: mysql_pconnect(): User daveandfi_catalog has already more than 'max_user_connections' active connections in /home/daveandfi/public_html/catalog/admin/includes/functions/database.php on line 17

Unable to connect to database server!

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...