Too many simultaneous MYSQL connections

11 posts by 3 authors in: Forums > CMS Builder
Last Post: September 19, 2011   (RSS)

Hi All,

I’ve been having possible “too many connection” database issues with my web host and was wondering...

The web host (IXWebHosting) says that they allow 50 simultaneous connections per "user".

Under Admin > General > server info it says: MySQL v5.1.51 (Max Connections: 30)

Does this mean that they should (can) change the 30 to a 50 in some setup program?

Does “user” refer to a visitor or to the website itself?

Is there any PHP code that I can use to determine how many simultaneous connections are actually being opened by my pages?

Thanks,

Jerry Kornbluth
The first CMS Builder reference book is now available on-line!







Take advantage of a free 3 month trial subscription, only for CMSB users, at: http://www.thecmsbcookbook.com/trial.php

Re: [gkornbluth] Too many simultaneous MYSQL connections

By Dave - September 15, 2011

Hi Jerry,

I wrote this test script for you. Add your mysql details to the file and then run it and let me know what it says.

Also, if you have the MySQL Console plugin you can run this MySQL query to see who is connected "SHOW FULL PROCESSLIST"

Let me know how it goes.
Dave Edis - Senior Developer
interactivetools.com

Re: [Dave] Too many simultaneous MYSQL connections

By gkornbluth - September 16, 2011 - edited: September 16, 2011

Thanks for this, Dave

I ran both

The script you wrote returned:

MySQL max_connections: 450
MySQL max_user_connections: 30

The results for SHOW FULL PROCESSLIST is attached

Don't know what they mean but would like to understand more.

Jerry Kornbluth
The first CMS Builder reference book is now available on-line!







Take advantage of a free 3 month trial subscription, only for CMSB users, at: http://www.thecmsbcookbook.com/trial.php
Attachments:

full-processlist.jpg 64K

Re: [gkornbluth] Too many simultaneous MYSQL connections

By Dave - September 16, 2011

Hi Jerry,

Based on my understanding you'll get a "Too Many Connections" error if either:
- All the users (websites) who use that mysql server at your web host make a total of 450 connections or more at the same time
- Your website makes over 30 connections at the same time.

I'd point your webhost to that script and ask why if says 30 if the limit is 50. And if the "Too Many Connections" errors are caused by your website or whether their MySQL server has too many customers on it.

And see this:
http://dev.mysql.com/doc/refman/5.5/en/too-many-connections.html
I think if you hit the max_user_connections limit you might actually get a different error.

Hope that helps! Let me know what they say.
Dave Edis - Senior Developer
interactivetools.com

Re: [gkornbluth] Too many simultaneous MYSQL connections

By Damon - September 16, 2011

Hi Jerry,

Running the script on my dreamhost.com account returned this:

MySQL max_connections: 1200
MySQL max_user_connections: 300
Cheers,
Damon Edis - interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

Re: [Damon] Too many simultaneous MYSQL connections

Hi Damon,

Just curious, is yours a shared hosting account as well?

Jerry
The first CMS Builder reference book is now available on-line!







Take advantage of a free 3 month trial subscription, only for CMSB users, at: http://www.thecmsbcookbook.com/trial.php

Re: [gkornbluth] Too many simultaneous MYSQL connections

By Damon - September 16, 2011

Hi Jerry,

Yes, this is the low cost shared hosting account.
Cheers,
Damon Edis - interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

Re: [Damon] Too many simultaneous MYSQL connections

Thanks,

Food for thought..

Jerry
The first CMS Builder reference book is now available on-line!







Take advantage of a free 3 month trial subscription, only for CMSB users, at: http://www.thecmsbcookbook.com/trial.php

Re: [Dave] Too many simultaneous MYSQL connections

Ah, for the good old (simpler) days before computers and the internet...
The first CMS Builder reference book is now available on-line!







Take advantage of a free 3 month trial subscription, only for CMSB users, at: http://www.thecmsbcookbook.com/trial.php