PDA

View Full Version : max_user_connections Database error


suraja
11-24-2008, 03:00 AM
Hi,

I need suggestions here, I always got this error report :
mysql_connect() [<a href='function.mysql-connect'>function.mysql-connect</a>]: User mydatabase already has more than 'max_user_connections' active connections

When I tried to contact my hosting at Servage.net, they said they only allow 20 Mysql connections at a time

Is there any solution for this problem? Please help

DieselMinded
11-24-2008, 03:02 AM
Your host can up your amount of connections

SEOvB
11-24-2008, 03:03 AM
Upgrade your hosting, or move to a better vBulletin web host that allows more than 20 concurrent connections.

suraja
11-24-2008, 03:16 AM
Servage won't raise amount of connections, and they also don't have other hosting package to upgrade :(

Is there any other solution than move to other host??

SEOvB
11-24-2008, 03:18 AM
Nope, you can only work with what servage will let you work with.

DieselMinded
11-24-2008, 03:25 AM
ditch them if they wont help you when you need it now then they wont be there when you need them later either

suraja
11-24-2008, 03:50 AM
Here's what Servage team suggest me:

The error of max user connections that occurred happens when an account on the server is opening to many connections to mysql on the server. This happens sometimes with poorly written code that leaves connections open and keeps opening more connections. When one account does this it affects the entire mysql server resulting in the error you received and is only fixed when we find the issue and stop those lingering connections. Please note the same at your end.

It seems that your script is generating too many mysql connections at a time. I would like to suggest you a couple of things which you should always keep in mind.

1. Check that your PHP code and any other tools always close connections - many database servers require this, and it is good practice.

2. Use mysql_connect() instead of mysql_pconnect() unless you have a good reason to do so.

3. Always put a mysql_close() in the scripts you are using.

SEOvB
11-24-2008, 03:57 AM
vBulletin writes code pretty good and no other users have these problems so unless your site is to large for shared hosting, or you have a modification thats causing the problem but that would be impossible for us to tell.

suraja
11-24-2008, 04:04 AM
My site only have 2-3k unique per day and no modif there :(

SEOvB
11-24-2008, 08:41 AM
My site only have 2-3k unique per day and no modif there :(

Seriously? 2-3k uniques daily on shared hosting?

I'm pretty sure you should be thanking servage for hosting that on a shared environment then.

Its simply time to upgrade to a VPS.