Page 1 of 1
max_user_connections
Posted: Tue Nov 18, 2003 1:26 am
by nmotion
I had a site running fine and it has been doing so for months. Then suddenly this came:
Warning: mysql_connect(): User dvdtown_sqledit has already more than 'max_user_connections' active connections in
What could be wrong? Is there a way to fix this in the code or? Any help or ideas are appreciated.
The whole thing is coded in PHP and MySQL.
Posted: Tue Nov 18, 2003 3:30 am
by twigletmac
Basically it's saying that there's too many connections to the database. Is this your own server or a hosts?
Mac
Posted: Tue Nov 18, 2003 3:45 am
by nmotion
It is a host.
Insiderhosting.com
Posted: Tue Nov 18, 2003 3:53 am
by twigletmac
Have you asked them about this problem? Do you know how many connections you're allowed - if you have a look at the output of phpinfo() what's the value of mysql.max_links?
Mac
Posted: Tue Nov 18, 2003 4:23 am
by nmotion
It says Unlimited in both Local and Master.
Posted: Tue Nov 18, 2003 4:37 am
by twigletmac
Check with your host about how many connections you're allowed.
Mac
Posted: Tue Nov 18, 2003 6:14 am
by nmotion
Doesn't unlimited mean unlimited? Or is it something else I have to ask about?
Also, this has not been a problem in the past. The site has run with many visitors for months with no problems. So it comes as a big supprise.
What I need is some information about how to solve this. Where to look. Perhaps some web sites dealing with it etc.
Posted: Tue Nov 18, 2003 6:51 am
by twigletmac
Your host may have only just implemented this and I doubt there'd be a way around it without getting them to tweak your user account. Of course if this is a user that you've created you may have more luck:
http://www.mysql.com/doc/en/User_resources.html
Mac
Posted: Tue Nov 18, 2003 7:57 am
by nmotion
The support guy wrote:
I would look to see if you have persistent connections on or off.
What does he mean by this?
Posted: Tue Nov 18, 2003 8:05 am
by JayBird
from your phpinfo look for mysql.allow_persistent under the mysql section.
Can't believe your host couldn't tell you this.
Suppose you could change it within a script though!?
Check here to read more about persistent connections
http://uk2.php.net/manual/en/features.p ... ctions.php
Mark
Posted: Tue Nov 18, 2003 8:19 am
by nmotion
This one is also set to Unlimited in both Local and Master.
Posted: Tue Nov 18, 2003 8:35 am
by JayBird
i think you are looking at the wrong one. It should be On or Off.
You might be looking at mysql.max_persistent.
Has you host recently upgraded their version of PHP, that is sometimes why your scripts work fine for ages, then suddenly don't for no apparent reason.
Mark
Posted: Tue Nov 18, 2003 8:42 am
by nmotion
Sorry,
It is: ON
Posted: Tue Nov 18, 2003 9:03 am
by JayBird
I think you need to talk to your host again then.
Mark