Jump to content

Too many connections


mailtome

Recommended Posts

you have reached the maximum number of concurrent connections to your mysql database.

Are you using mysql_pconnect() or mysql_connect() ?

I was using pconnect for a long time, and couldnt figure out the reason why it kept maxing out. Turned out every database conection stayed open and kept adding new connections on top.
Link to comment
https://forums.phpfreaks.com/topic/8346-too-many-connections/#findComment-30425
Share on other sites

[!--quoteo(post=368310:date=Apr 25 2006, 02:39 AM:name=wisewood)--][div class=\'quotetop\']QUOTE(wisewood @ Apr 25 2006, 02:39 AM) [snapback]368310[/snapback][/div][div class=\'quotemain\'][!--quotec--]
you have reached the maximum number of concurrent connections to your mysql database.

Are you using mysql_pconnect() or mysql_connect() ?

I was using pconnect for a long time, and couldnt figure out the reason why it kept maxing out. Turned out every database conection stayed open and kept adding new connections on top.
[/quote]
I am using mysql_connect
Link to comment
https://forums.phpfreaks.com/topic/8346-too-many-connections/#findComment-30452
Share on other sites

I cant remember where it is now, but there is a mysql ini file with a setting for max concurrent connections, simply increase that to the maximum connections you might require.

However, if you're not having many users online at once at the moment (less than 20 for example) and you're not using mysql_pconnect i see no reason why this should be max'ing your connections.

Link to comment
https://forums.phpfreaks.com/topic/8346-too-many-connections/#findComment-30459
Share on other sites

I close the connections when ever I open them. But I think that should not matter because I am using mysql_connect. This is from PHP documentation
[b]Using mysql_close() isn't usually necessary, as non-persistent open links are automatically closed at the end of the script's execution.[/b]
Link to comment
https://forums.phpfreaks.com/topic/8346-too-many-connections/#findComment-30471
Share on other sites

I can only suggest finding out what the current max connections is set to, and how many connections you have running.

In phpmyadmin you can find out what connections there are by doing the following;

From the main page choose "show processes"
This will display all active connections.

At present mine shows two connections, and we have 7 users currently online, each with an automatic query running every 60 seconds.

Link to comment
https://forums.phpfreaks.com/topic/8346-too-many-connections/#findComment-30475
Share on other sites

exactly. Still dont understand how you've got max connections on if you're not letting anyone use the script except yourself and you're not using pconnect though.

Is this a local install or is it on an ISP installation? Have you used this before for other projects?
Link to comment
https://forums.phpfreaks.com/topic/8346-too-many-connections/#findComment-30486
Share on other sites

Archived

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

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.