sql error mysql40 : too many connections 4040

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
kalamitykatie
Registered User
Posts: 39
Joined: Mon Jul 24, 2006 10:37 pm

sql error mysql40 : too many connections 4040

Post by kalamitykatie » Mon Dec 10, 2012 7:02 pm

Hello,

I both host and help administer a phpBB 3.01 forum on a MS Win 2003 Server with MySQL 5.0.18. The database size is 1.2GiB.

As of recently, when a moderator or administrator bans a user by IP address, the site gets locked up with "sql error mysql40 : too many connections 4040." Sometimes only the admin/mod who attempted to ban a user by IP is affected, sometimes others users are affected. The issue self-resolves in minutes.

I searched that error and found many posts concerning it (some threads going on for many pages), but did not find a solution.

User avatar
Lumpy Burgertushie
Registered User
Posts: 66338
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: sql error mysql40 : too many connections 4040

Post by Lumpy Burgertushie » Tue Dec 11, 2012 3:50 am

most likely the ban IP table is full in the database. banning via IP is virtually pointless since the spammers use different IPs at will. best thing to do is to truncate the ban IP table and setup the board with the builtin Q&A to stop the spam bots from registering.

robert
I'm baaaaaccckkkk. still doing work on donation basis. PM your needs.

Premium phpBB 3.2 Styles by PlanetStyles.net

If a tree falls in the forest and nobody is there, does it make a sound?

Oleg
Former Team Member
Posts: 1221
Joined: Sat Jan 30, 2010 4:42 pm
Location: NYC
Contact:

Re: sql error mysql40 : too many connections 4040

Post by Oleg » Tue Dec 11, 2012 7:52 am

When it happens run this query:

show processlist

Note the total number of connections, compare to your limit. Note if queries are waiting for a lock on a particular table.
Participate in phpBB development: Get involved | Issue tracker | Report a bug | Development board | [url=irc://chat.freenode.net/phpbb-dev]Development IRC chat[/url]
My stuff: mindlinkgame.com

kalamitykatie
Registered User
Posts: 39
Joined: Mon Jul 24, 2006 10:37 pm

Re: sql error mysql40 : too many connections 4040

Post by kalamitykatie » Tue Dec 11, 2012 4:46 pm

Lumpy Burgertushie wrote:most likely the ban IP table is full in the database. banning via IP is virtually pointless since the spammers use different IPs at will. best thing to do is to truncate the ban IP table and setup the board with the builtin Q&A to stop the spam bots from registering.

robert
Once upon a time, entire ranges of IP's were banned due to spammers. That is not effective for preventing spammers, for sure. We are using Q&A and admin approval for new joins these days.

Now IP banning is used solely to block access to abusive forum members so they don't rejoin with a new username when banned. Yes, a savvy user can get around that, but the average user doesn't know how to go about doing such.

I'll clear the banned IP's and tried banning a single IP and the site locked up. Waiting now for it to "recover."

Thanks!

kalamitykatie
Registered User
Posts: 39
Joined: Mon Jul 24, 2006 10:37 pm

Re: sql error mysql40 : too many connections 4040

Post by kalamitykatie » Fri Dec 14, 2012 10:45 pm

Today a moderator banned a user, by name only, and the problem occurred again.

There are only about a dozen banned usernames.

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

Re: sql error mysql40 : too many connections 4040

Post by Oyabun1 » Sat Dec 15, 2012 3:02 am

Oleg wrote:When it happens run this query:

show processlist

Note the total number of connections, compare to your limit. Note if queries are waiting for a lock on a particular table.
                      Support Request Template
3.0.x: Knowledge Base Styles Support MOD Requests
3.1.x: Knowledge BaseStyles SupportExtension Requests

Locked

Return to “[3.0.x] Support Forum”