Matrix
11-30-2008, 03:09 PM
mysql_connect(): Too many connections
/home/bettorschat/htdocs/forums/includes/class_core.php on line 311
For the last 2 weeks I have this problem on Sunday with too many connections. I had them increase the mySQL connections to 1500 from 800. I get 800-850 connections on this forum.
Any ideas or help on this?
Matrix
11-30-2008, 03:36 PM
Custom as in? It's vbulletin with only portal and 1 hack.
007css
12-01-2008, 05:56 PM
I had a shoutbox mod do that. So what mod are you using it could just be doubling connections on the same session.
parasane
12-01-2008, 06:22 PM
mysql_connect(): Too many connections
/home/bettorschat/htdocs/forums/includes/class_core.php on line 311
For the last 2 weeks I have this problem on Sunday with too many connections. I had them increase the mySQL connections to 1500 from 800. I get 800-850 connections on this forum.
Any ideas or help on this?
Have them check the server resources as well. MySQL messages can be rather vague at times, and while your maximum connections may be increased in my.cnf, your server's hardware may not be able to handle it. Other reasons could be resource throttling, a poorly-tuned MySQL/machine, et cetera.
Also, when making changes to `my.cnf`, make sure they restart MySQL.
etogre
12-01-2008, 08:20 PM
I think the issue you are experiencing is that some of your queries are taking too long to execute. MySQL queries generally execute pretty quickly, and 1500 simultaneous connections should be more than plenty for the traffic you say you have. You should try profiling the queries to see where any bottlenecks are at (I know phpBB allows you to view the queries and execution times as an admin, but I'm not sure about VB. There is probably a mod however)
blawar
12-03-2008, 01:48 AM
if you are on a unix machine, use mytop to see what mysql is doing. Also see if your mysql process is consuming a lot of cpu time. May want to research mysql_pconnect (persistent connections) if the problem is just simply related to high site traffic.
creativeartist
12-05-2008, 01:07 PM
Did you check mysql server is working....May be its the problem
Jedito
12-05-2008, 01:49 PM
what's the wait timeout that you have set?
also what's the connection limit per user?
bager
12-05-2008, 04:03 PM
if you are on dedicated server find mysql config file increase the connections limit.
reca12
12-08-2008, 09:39 PM
The right solution is using a connection pool, so all your HTTP requests will be using the same lets say 100 DB connections.
But I guess you will need to make some modifications in your code. If you have difficulties with it I may help
allportpc
12-11-2008, 03:53 PM
the setting is in your php.ini file. If you can control the php.ini file, you need to adjust maximum connections. By default it is 100. i had this problem last year and increased the number to 1000.
Jedito
12-11-2008, 04:29 PM
the setting is in your php.ini file. If you can control the php.ini file, you need to adjust maximum connections. By default it is 100. i had this problem last year and increased the number to 1000.
No, the setting is on the mysql config file.
HaywireMedia
12-11-2008, 08:25 PM
You can find the MySQL config at /etc/my.ini, modify max_connections to double what it is, may not be the most reliable way of doing things, but it may help.