more than 'max_user_connections' active connections [1203]?

Get help with installation and running phpBB 3.0.x here. Please do not post bug reports, feature requests, or MOD-related questions here.
Scam Warning
Forum rules
END OF SUPPORT: 1 January 2017 (announcement)
Locked
uLabs
Registered User
Posts: 39
Joined: Sun Jun 24, 2012 10:31 am

more than 'max_user_connections' active connections [1203]?

Post by uLabs » Wed Jun 05, 2013 10:18 am

Hello,

I have recently been encountering an extremely annoying error when trying to connect to my forum. The error I am receiving is:

Code: Select all

SQL ERROR [ mysqli ] 

User phpQ2x1oaIz already has more than 'max_user_connections' active connections [1203] 

An sql error occurred while fetching this page. Please contact an administrator if this problem persists. 
Sometimes, the site does not load at all, or loads extremely slowly! I do not have many users, do the database cannot be massive. This happens between 3 - 5 times daily, and last perhaps 10 minutes each time. It never used to do this.

I do not have many users or posts, so the database is not massive. I keep receiving this error and have reported it numerous times to my hosting provider (iPage). Here's what they said:
Thank you for contacting support.

We are sorry for the inconvenience caused. We allow 10 concurrent connections to the MySQL servers. Unfortunately, it is not possible to increase this limit. Currently, the URL is loading fine at my end.
They then said:
We can understand your concern regarding your issue and we're sorry about that. The reason for the error message you were receiving is that on our platform the maximum concurrent MySQL connections per database user is 10. If you exceed the limit, you will not be able to connect the database. Please make sure that the application/script you are using closes the connection after the query action is performed so that concurrent connection is not exceeded.

Too Many Connections can be caused by either a lot of simultaneous connections or by old connections not being released soon enough. There are some simple changes you can make to your PHP code and your MySQL settings to prevent both.
I have looked at many topics but cannot find a solution. Have you experienced this issue? Do you know how to fix it?

www.DiscussionLounge.co.uk is the URL

Thank in advance!

User avatar
Oyabun1
Former Team Member
Posts: 23164
Joined: Sun May 17, 2009 1:05 pm
Location: Australia
Name: Bill

Re: more than 'max_user_connections' active connections [120

Post by Oyabun1 » Wed Jun 05, 2013 11:37 am

Please fill out the Support Request Template and post it back here to enable us to assist you better. The "When did your problem begin?" question means: Please describe the actions you took (updating your board, installing a MOD, etc.) prior to this problem becoming noticeable.
                      Support Request Template
3.0.x: Knowledge Base Styles Support MOD Requests
3.1.x: Knowledge BaseStyles SupportExtension Requests

uLabs
Registered User
Posts: 39
Joined: Sun Jun 24, 2012 10:31 am

Re: more than 'max_user_connections' active connections [120

Post by uLabs » Wed Jun 05, 2013 1:14 pm

Support Request Template
What version of phpBB are you using? phpBB 3.0.11
What is your board's URL? http://discussionlounge.co.uk
Who do you host your board with? iPage
How did you install your board? I used a tool provided by my host
What is the most recent action performed on your board? Fresh Install
Is registration required to reproduce this issue? No
Do you have any MODs installed? Yes
What MODs do you have installed? I cannot provide as my board cannot be accessed at this time (due to error)!
What styles do you currently have installed? Prosilver - (in date)
What language(s) is your board currently using? Standard - British English
Which database type/version are you using? MySQL 5
What is your level of experience? New to PHP but not phpBB
When did your problem begin? We keep a change log, which I keep record of every change I make e.g. installed a new mod, update a mod, modify the style, etc. The issue began 2 weeks ago, and I have not installed any modifications within that time period.
Please describe your problem. I have recently started receiving another error!

SQL ERROR [ mysqli ]

Too many connections [1040]

An sql error occurred while fetching this page. Please contact an administrator if this problem persists.

The problem I had before was:

SQL ERROR [ mysqli ]

User phpQ2x1oaIz already has more than 'max_user_connections' active connections [1203]

An sql error occurred while fetching this page. Please contact an administrator if this problem persists.
Generated by SRT Generator

Slackervaara
Registered User
Posts: 195
Joined: Thu Feb 28, 2008 7:46 am

Re: more than 'max_user_connections' active connections [120

Post by Slackervaara » Wed Jun 05, 2013 5:43 pm

This error happens to my site now and then periodically and for short periods hours. I have the cheapest host and due to that the database server gets overloaded and this error occurs. Some periods this error is so short that, when I reload the page it works normally again.

uLabs
Registered User
Posts: 39
Joined: Sun Jun 24, 2012 10:31 am

Re: more than 'max_user_connections' active connections [120

Post by uLabs » Wed Jun 05, 2013 8:07 pm

The issue is, I'm paying about £80 a year for this hosting. Everything is included in this package, I have unlimited bandwidth, memory, MySQL databases etc.

Slackervaara
Registered User
Posts: 195
Joined: Thu Feb 28, 2008 7:46 am

Re: more than 'max_user_connections' active connections [120

Post by Slackervaara » Wed Jun 05, 2013 8:32 pm

I pays 30 pounds a year and that includes domain cost also. It has happened earlier, when my site was very slow that I complained to the host and then I was moved to a faster server.

User avatar
Oyabun1
Former Team Member
Posts: 23164
Joined: Sun May 17, 2009 1:05 pm
Location: Australia
Name: Bill

Re: more than 'max_user_connections' active connections [120

Post by Oyabun1 » Wed Jun 05, 2013 9:49 pm

Standard phpBB closes connections to the database that are not in use and so the problem is likely to be because of a MOD or that your host has reduced the number of allowed connections.

Try removing any MODs you added a few weeks before the problem started.
                      Support Request Template
3.0.x: Knowledge Base Styles Support MOD Requests
3.1.x: Knowledge BaseStyles SupportExtension Requests

User avatar
Brf
Support Team Member
Support Team Member
Posts: 50476
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}
Contact:

Re: more than 'max_user_connections' active connections [120

Post by Brf » Wed Jun 05, 2013 10:53 pm

What is that "Autoupdate every 5 seconds" thing for? That is undoubtedly causing your problem. If you have several guests, they will all be auto-refreshing every 5 seconds, banging your database server over and over...

User avatar
RMcGirr83
Recognised Extension Developer
Posts: 19971
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr
Contact:

Re: more than 'max_user_connections' active connections [120

Post by RMcGirr83 » Thu Jun 06, 2013 10:44 am

Brf wrote:What is that "Autoupdate every 5 seconds" thing for?
The mChat Mod as it uses ajax and yes, it does close it's connections. OP could increase that number in the ACP settings for the mod and that is all I will say on that because the OP has also chosen to remove my copyright notice. No notice, no support.
In times of change, learners inherit the earth, while the learned find themselves beautifully equipped to deal with a world that no longer exists - Eric Hoffer
Former Modifications/Extensions Team Member | My extensions
Appreciate the extensions/mods/support then buy me a beer
All requests for support via PM will be ignored

User avatar
Brf
Support Team Member
Support Team Member
Posts: 50476
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}
Contact:

Re: more than 'max_user_connections' active connections [120

Post by Brf » Thu Jun 06, 2013 1:44 pm

His host is only allowing 10 concurrent connections. If he has 10 guests, or bots, viewing his board, it is likely that there would be more than 10 concurrent connections with a heartbeat of only 5 seconds.

User avatar
RMcGirr83
Recognised Extension Developer
Posts: 19971
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr
Contact:

Re: more than 'max_user_connections' active connections [120

Post by RMcGirr83 » Thu Jun 06, 2013 9:56 pm

Then the OP should either 1) uninstall the mod as the host can not possibly handle it or 2) find a new host that allows more than 10 concurrent connections.

FWIW, many hosts that allow unlimited >everything< also have it set so that it allows more than 10 concurrent connections. Running a phpBB forum that only allows 10 concurrent connections and having, say, 50+ users on at any one time, more than likely the same thing will occur.

No one is forcing the OP to use the mod. ;)
In times of change, learners inherit the earth, while the learned find themselves beautifully equipped to deal with a world that no longer exists - Eric Hoffer
Former Modifications/Extensions Team Member | My extensions
Appreciate the extensions/mods/support then buy me a beer
All requests for support via PM will be ignored

Slackervaara
Registered User
Posts: 195
Joined: Thu Feb 28, 2008 7:46 am

Re: more than 'max_user_connections' active connections [120

Post by Slackervaara » Fri Jun 07, 2013 6:42 pm

Found this:

Make a file in your sites home directory (same place where index.php is found) called phpinfo.php. Place the following in the file
<?php
phpinfo();
?>

Now point your browser to http://www.yoursite.com/phpinfo.php

Look down for the section on mysql and the values of
mysql.connect_timeout,
mysql.max_links and
mysql.max_persistent (if mysql.allow_persistent is ON).
So what are the three values?
If either of the later is not unlimited and the number is small this will cause you problems. If mysql.connect_time is -1 (no timeout) is likely to aggrevate any problems.

https://drupal.org/node/30420

Checked my cheap host One.com
Unlimited unless mysql.connect_timeout that was 60 s.

User avatar
Brf
Support Team Member
Support Team Member
Posts: 50476
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}
Contact:

Re: more than 'max_user_connections' active connections [120

Post by Brf » Fri Jun 07, 2013 6:49 pm

This is not a PHP problem, so viewing the php.ini info will not help.
The problem here is that the host is only allowing 10 concurrent connections to the database server. This is a setting in mysql, not PHP.

Locked

Return to “[3.0.x] Support Forum”

Who is online

Users browsing this forum: Bing [Bot] and 50 guests

cron