The Gaming Den Forum Index The Gaming Den
Welcome to the Gaming Den.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Google
 Search WWW   Search tgdmb.com 
"too many connections" is back

 
Post new topic   Reply to topic    The Gaming Den Forum Index -> About the Gaming Den
View previous topic :: View next topic  
Author Message
fectin
Duke


Joined: 01 Feb 2010
Posts: 2149

PostPosted: Tue Jul 05, 2011 7:42 pm    Post subject: "too many connections" is back Reply with quote Add User to Ignore List

Quote:
Warning: mysql_connect() [function.mysql-connect]: User niftymes_tgdmbpr already has more than 'max_user_connections' active connections in /home2/niftymes/public_html/tgdmb/db/mysql4.php on line 48
phpBB : Critical Error


I got this a couple minutes ago. I know there was a separate thread on it before, but I couldn't find it.

Edit: And now I'm getting it a whole bunch. Like every other link. Am I the only one?


Last edited by fectin on Tue Jul 05, 2011 7:49 pm; edited 1 time in total
Back to top
View user's profile Send private message AIM Address
tzor
Prince


Joined: 07 Mar 2008
Posts: 4266

PostPosted: Tue Jul 05, 2011 7:53 pm    Post subject: Reply with quote Add User to Ignore List

YOU ARE NOT ALONE!

Although I'm not getting it at this moment.

I suspect we are being visited by bots on a frequent basis.

After I posted I went to the main page

In total there are 35 users online :: 8 Registered, 0 Hidden and 27 Guests


Last edited by tzor on Tue Jul 05, 2011 7:55 pm; edited 1 time in total
Back to top
View user's profile Send private message
Meikle641
Knight-Baron


Joined: 05 May 2008
Posts: 808
Location: Ontario, Canada

PostPosted: Tue Jul 05, 2011 8:00 pm    Post subject: Reply with quote Add User to Ignore List

Just got that error myself.
_________________
Back to top
View user's profile Send private message Visit poster's website AIM Address
Zherog
Knight-Baron


Joined: 07 Mar 2008
Posts: 771

PostPosted: Tue Jul 05, 2011 9:28 pm    Post subject: Re: "too many connections" is back Reply with quote Add User to Ignore List

Thanks for the heads up.

fectin wrote:
I know there was a separate thread on it before, but I couldn't find it.


It didn't have its own thread; the previous discussions are in the "report bugs" thread. Probably better to have it out here on its own, though.

tzor wrote:
In total there are 35 users online :: 8 Registered, 0 Hidden and 27 Guests


That's certainly not excessive...
_________________
You can't fix stupid.

"A life is not important except in the impact it has on other lives." ~ Jackie Robinson
Back to top
View user's profile Send private message Send e-mail
tzor
Prince


Joined: 07 Mar 2008
Posts: 4266

PostPosted: Wed Jul 06, 2011 2:24 pm    Post subject: Re: "too many connections" is back Reply with quote Add User to Ignore List

Zherog wrote:
That's certainly not excessive...


No it's not, but if they are bots, they may be using resources faster than normal humans merely because they are scanning a page in milliseconds while normal humans often take a minute looking at the results of a web page query. Thus if 30 humans were on line it would be rare for two of them to hit the database at the same time, but or 30 bots, at any given moment several may be hitting the database.

Just my wild speculation, since i don't know the max database connection number for this system.
Back to top
View user's profile Send private message
Zherog
Knight-Baron


Joined: 07 Mar 2008
Posts: 771

PostPosted: Wed Jul 06, 2011 3:14 pm    Post subject: Reply with quote Add User to Ignore List

I did a bit more digging last night, and for the first time my searching turned up an answer that points to a bug in the software rather than a server-side setting. If the source I found is correct, phpbb has a bug that makes it so not all db connections are closed after they're used. Eventually, the open connection will time out and release itself, but if enough of them hang at one time (such as when a crawler is on the site), then we get the error.

The source I found also had a very simple fix that can be added to any page. It goes out, finds SQL connections older than some specified time, and kills them. I'm going to find some time this week to make those changes, and then we'll see if the issue goes away.
_________________
You can't fix stupid.

"A life is not important except in the impact it has on other lives." ~ Jackie Robinson
Back to top
View user's profile Send private message Send e-mail
Parthenon
Knight-Baron


Joined: 24 Jan 2009
Posts: 735

PostPosted: Thu Jul 14, 2011 3:58 pm    Post subject: Reply with quote Add User to Ignore List

If you've already made those changes then it hasn't helped- I just got another too many connections error twice in a row about a minute ago.
Back to top
View user's profile Send private message
Zherog
Knight-Baron


Joined: 07 Mar 2008
Posts: 771

PostPosted: Thu Jul 14, 2011 6:20 pm    Post subject: Reply with quote Add User to Ignore List

I haven't yet made the changes. Been losing a fight with the scheduling monster. Thanks for the update, though.

edit: also, I deleted one of your double posts... just so nobody wonders where it went.
_________________
You can't fix stupid.

"A life is not important except in the impact it has on other lives." ~ Jackie Robinson


Last edited by Zherog on Thu Jul 14, 2011 6:21 pm; edited 2 times in total
Back to top
View user's profile Send private message Send e-mail
Zherog
Knight-Baron


Joined: 07 Mar 2008
Posts: 771

PostPosted: Wed Jul 27, 2011 2:18 pm    Post subject: Reply with quote Add User to Ignore List

note to self: get off your lazy ass and fix the error already, you lazy fucking bastard...
_________________
You can't fix stupid.

"A life is not important except in the impact it has on other lives." ~ Jackie Robinson
Back to top
View user's profile Send private message Send e-mail
fectin
Duke


Joined: 01 Feb 2010
Posts: 2149

PostPosted: Fri Jul 29, 2011 9:22 pm    Post subject: Reply with quote Add User to Ignore List

Would it work t write a cronjob that kills all old connections every 15 min?
Back to top
View user's profile Send private message AIM Address
Zherog
Knight-Baron


Joined: 07 Mar 2008
Posts: 771

PostPosted: Sun Jul 31, 2011 4:03 pm    Post subject: Reply with quote Add User to Ignore List

I've just now installed a fix. While I can't test it - because I don't have the capacity to reproduce the error - everything seems to be functioning normal. Essentially, every time anybody loads the index page it'll go out and find any SQL connections that are more than 500 seconds old and kill them. I can adjust that number up or down as needed. My hunch is I'll need to reduce it once or twice, but I'd rather start out there.

If anybody has any issues loading pages today (Sunday July 31st) please send me a PM so that I'll get an email notification. I can revert back to the previous code if necessary. If anybody encounters the "too many connections" error going forward, please post the info in this thread, and I'll look into getting the number of seconds reduced.

Sorry for the delay getting it fixed; hopefully this wraps up the issue.

*

Fectin -- your idea would seem to work to me, except I don't know if I have access to crontab on the server or not. The solution I have, instead, just looks for the old connections whenever that page loads and kills them. Same effect, different way of getting to it.
_________________
You can't fix stupid.

"A life is not important except in the impact it has on other lives." ~ Jackie Robinson
Back to top
View user's profile Send private message Send e-mail
Zherog
Knight-Baron


Joined: 07 Mar 2008
Posts: 771

PostPosted: Mon Aug 01, 2011 1:18 pm    Post subject: Reply with quote Add User to Ignore List

Alright, so no PMs and no posts since I made the changes likely means I didn't fuck anything up. Yay me!

Hopefully this issue is behind us now. Of course, if anybody encounters it then certainly go ahead and post here, and I'll see if I can find anything else on the error.
_________________
You can't fix stupid.

"A life is not important except in the impact it has on other lives." ~ Jackie Robinson
Back to top
View user's profile Send private message Send e-mail
Zherog
Knight-Baron


Joined: 07 Mar 2008
Posts: 771

PostPosted: Mon Aug 08, 2011 2:50 pm    Post subject: Reply with quote Add User to Ignore List

Well, so much for it being fixed... I just got the message. At some point this week I'll try adding the code to a page that gets loaded more often, like the Forum or Thread page, rather than just the index.
_________________
You can't fix stupid.

"A life is not important except in the impact it has on other lives." ~ Jackie Robinson
Back to top
View user's profile Send private message Send e-mail
fectin
Duke


Joined: 01 Feb 2010
Posts: 2149

PostPosted: Fri Sep 16, 2011 1:50 pm    Post subject: Reply with quote Add User to Ignore List

It's back again. I've been getting rather a lot of them.
Back to top
View user's profile Send private message AIM Address
Prak_Anima
Overlord


Joined: 07 Mar 2008
Posts: 9026

PostPosted: Fri Sep 23, 2011 6:50 pm    Post subject: Reply with quote Add User to Ignore List

today, 27 minutes ago.
Click here to see the hidden message (It might contain spoilers)

_________________
Formally taking commissions. Click to see prices and portfolio.

Winnah wrote:
No, No. 'Prak' is actually a Thri Kreen impersonating a human and roleplaying himself as a D&D character. All hail our hidden insect overlords.
Back to top
View user's profile Send private message
Cynic
Duke


Joined: 07 Mar 2008
Posts: 2422

PostPosted: Mon Oct 10, 2011 4:57 pm    Post subject: Reply with quote Add User to Ignore List

It's been appearing on and off today.
_________________
Koumei's The Last Laugh campaign - Murphy: Part man, part woman, part robot, mostly stolen from Robocop


Last edited by Cynic on Mon Oct 10, 2011 5:04 pm; edited 1 time in total
Back to top
View user's profile Send private message
shadzar
Prince


Joined: 26 Jun 2009
Posts: 3674

PostPosted: Sat Oct 15, 2011 6:26 am    Post subject: Reply with quote Add User to Ignore List

massive too many connections and 500 server errors, within the past 2 hours.
_________________
Play the game, not the rules.
Click here to see the hidden message (It might contain spoilers)
good read (Note to self Maxus sucks a barrel of cocks.)
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    The Gaming Den Forum Index -> About the Gaming Den All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




Powered by phpBB © 2001, 2005 phpBB Group