Previous Thread
Next Thread
Print Thread
Rate Thread
Joined: Oct 1999
Posts: 282
Enthusiast
Enthusiast
Offline
Joined: Oct 1999
Posts: 282
Since several months we have the problem when too many users are active in the forums, the database will not allow any more connections. At the moment we can't do anything to fix that, because we're on a shared server without access to the mysql settings. Well, we still can live with that until running our own server.

But yesterday the log was filled up with these "User ubb has already more than 'max_user_connections' active connections" errors. Even the problem only consisted for a few seconds!

The log has got more than 3800 rows and start with:
[ERROR][Thu, Oct 07 2004 15:58:07 +0200] [/showflat.php] [80.144.38.180] Script: - Line: Unable to connect to the database! - User ubb has already more than 'max_user_connections' active connections
[ERROR][Thu, Oct 07 2004 15:58:07 +0200] [/showflat.php] [80.144.38.180] Script: /htdocs/forum/ubbt.inc.php - Line: 2034 SELECT U_Username,U_Password,U_SessionId, U_StyleSheet, U_Status, U_Privates, U_FrontPage, U_Number, U_Banned,U_LastOn,U_OC_Userid FROM w3t_Users WHERE U_Number = '480' - User ubb has already more than 'max_user_connections' active connections
[ERROR][Thu, Oct 07 2004 15:58:07 +0200] [/showflat.php] [80.144.38.180] Script: /htdocs/forum/ubbt.inc.php - Line: 2034 SELECT U_Username,U_Password,U_SessionId, U_StyleSheet, U_Status, U_Privates, U_FrontPage, U_Number, U_Banned,U_LastOn,U_OC_Userid FROM w3t_Users WHERE U_Number = '480' - User ubb has already more than 'max_user_connections' active connections
[ERROR][Thu, Oct 07 2004 15:58:07 +0200] [/showflat.php] [80.144.38.180] Script: /htdocs/forum/ubbt.inc.php - Line: 2034 SELECT U_Username,U_Password,U_SessionId, U_StyleSheet, U_Status, U_Privates, U_FrontPage, U_Number, U_Banned,U_LastOn,U_OC_Userid FROM w3t_Users WHERE U_Number = '480' - User ubb has already more than 'max_user_connections' active connections
.
.
.
[ERROR][Thu, Oct 07 2004 15:58:08 +0200] [/showflat.php] [80.144.38.180] Script: /htdocs/forum/ubbt.inc.php - Line: 2034 SELECT U_Username,U_Password,U_SessionId, U_StyleSheet, U_Status, U_Privates, U_FrontPage, U_Number, U_Banned,U_LastOn,U_OC_Userid FROM w3t_Users WHERE U_Number = '480' - User ubb has already more than 'max_user_connections' active connections

There are 545 Rows with the same error, almost same time, same U_Number. How can this happen? I'm quite sure the query really isn't executed 545 times...

The log continues with:
[ERROR][Thu, Oct 07 2004 15:58:09 +0200] [/showflat.php] [82.182.119.10] Script: - Line: Unable to connect to the database! - User ubb has already more than 'max_user_connections' active connections
[ERROR][Thu, Oct 07 2004 15:58:09 +0200] [/showflat.php] [82.182.119.10] Script: /htdocs/forum/ubbt.inc.php - Line: 2034 SELECT U_Username,U_Password,U_SessionId, U_StyleSheet, U_Status, U_Privates, U_FrontPage, U_Number, U_Banned,U_LastOn,U_OC_Userid FROM w3t_Users WHERE U_Number = '' - User ubb has already more than 'max_user_connections' active connections
[ERROR][Thu, Oct 07 2004 15:58:09 +0200] [/showflat.php] [82.182.119.10] Script: /htdocs/forum/ubbt.inc.php - Line: 2034 SELECT U_Username,U_Password,U_SessionId, U_StyleSheet, U_Status, U_Privates, U_FrontPage, U_Number, U_Banned,U_LastOn,U_OC_Userid FROM w3t_Users WHERE U_Number = '' - User ubb has already more than 'max_user_connections' active connections
.
.
.
and so on with different User IDs.

Any ideas?

Sponsored Links
Joined: May 2003
Posts: 1,068
Junior Member
Junior Member
Offline
Joined: May 2003
Posts: 1,068
Make sure that you have "persistent connections" turned off in the Edit Config Setttings of your admin panel, that should take care of it for you.

Joined: Oct 1999
Posts: 282
Enthusiast
Enthusiast
Offline
Joined: Oct 1999
Posts: 282
right, but persistent connections are already off since a long time.

Joined: Sep 2003
Posts: 488
Code Monkey
Code Monkey
Joined: Sep 2003
Posts: 488
The 'max_user_connections' is for the entire server - not just your forums. The issue is with your host...they need to increase the number. There's really nothing you can do on your own, aside from turning of pconnect which doesn't apply to you.

Joined: Oct 1999
Posts: 282
Enthusiast
Enthusiast
Offline
Joined: Oct 1999
Posts: 282
Yes, but my question is regarding the logfile(!). Why are there so many entrys for one query?

Sponsored Links
Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
Well - checkout the debug information on the page. Every page does between 12 and 40 queries - so the log file filling up when MySQL is out is quite normal.

Joined: Oct 1999
Posts: 282
Enthusiast
Enthusiast
Offline
Joined: Oct 1999
Posts: 282
But we are talking about the same query several hundred times (see first post)?

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
The error log logs each query that has an error. That's the authenticate query. It's called on every page, by every user (registered or anonymous) so you could have hundreds of those a minute on an active site.


Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
Gizmo
Gizmo
Portland, OR, USA
Posts: 5,833
Joined: January 2000
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20221218)