Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 3 > General

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 12th April 2012, 12:02
mike_p mike_p is offline
Senior Member
 
Join Date: Mar 2010
Location: Surrey, England
Posts: 140
Thanks: 9
Thanked 28 Times in 17 Posts
Default MySQL connectons maxing out ...

Having had my server running flawlessly recently I was surprised this morning to find MySQL errors occurring - "Too Many Connections... "

After a MYSQL restart, things would work okay and then fail after a few minutes with the same problem.

My max_connections setting was at the defaul 100
- and it seems ispconfig was using 98 of those - then the errors were occurring.

After some trial and error, I've now found that by increasing the max_connections I can keep things running okay, but ispconfig has settled to using about 150 connections.

Why has this suddenly started happening?

(In my.cnf I've now set max_connections to 1000 and max_user_connections to 200 and we seem to be stable.)
Reply With Quote
Sponsored Links
  #2  
Old 12th April 2012, 12:06
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,736
Thanks: 840
Thanked 5,597 Times in 4,408 Posts
Default

Quote:
Why has this suddenly started happening?
100 connections are too few, I would set max_connections and max_user_connections to 500. This can happen when e.g. a lot of mails come in or when several web spiders like google, bing etc. spider a website that uses mysql.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #3  
Old 12th April 2012, 12:32
mike_p mike_p is offline
Senior Member
 
Join Date: Mar 2010
Location: Surrey, England
Posts: 140
Thanks: 9
Thanked 28 Times in 17 Posts
Default

Thanks for the reply.

Having run 'show full processlist' in mysql, I note that the majority of the connections form ispconfig are marked 'Sleep' - ie connection is idle. Is there an ispconfig process that is using a permanent connection where it shouldn't be used?
Or should ispconfig be closing the mysql connections after the process has finished?
Reply With Quote
  #4  
Old 12th April 2012, 12:44
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,736
Thanks: 840
Thanked 5,597 Times in 4,408 Posts
Default

Quote:
Having run 'show full processlist' in mysql, I note that the majority of the connections form ispconfig are marked 'Sleep' - ie connection is idle. Is there an ispconfig process that is using a permanent connection where it shouldn't be used?
These connections are not from ispconfig. You mix up the mysql username "ispconfig" with the software "ispconfig" here. The mysql username ispconfig is used by all software packages that read data from mysql and the connections you refer to are from postfix, amavisd, pure-ftpd dovecot, courier and vlogger and the connection is idle of course if the daemons dont need it at the moment e.g. because the postfix process that opened the connection does not need to query the database at that momentyou executed the command.

Everything is as it should on your server, you had just a connection limit that was too low.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
The Following User Says Thank You to till For This Useful Post:
mike_p (13th April 2012)
  #5  
Old 13th April 2012, 09:40
mike_p mike_p is offline
Senior Member
 
Join Date: Mar 2010
Location: Surrey, England
Posts: 140
Thanks: 9
Thanked 28 Times in 17 Posts
 
Default

Thanks for the explanation Till.

I've also now discovered that one of my client's email addresses had been put as a spoofed return address on a Nigerian scam email, so her email was being bombarded with rejections and complaints. This caused the overload.

Having changed the max_connections settings the system soon settled down.
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
CPU load locks up box. Apache or MYSQL related. crypted General 61 29th October 2010 23:16
Squirrelmail login failure Cracklefish Installation/Configuration 9 30th June 2010 21:38
ISPConfig3 Mail Warn Errors reason8 General 3 25th November 2009 14:58
Management/system config/settings & /server/settings not working!! dactor Installation/Configuration 9 6th February 2008 10:11
Mandriva 10.2 Perfect Setup Install Problems... ctroyp Installation/Configuration 12 30th December 2005 17:04


All times are GMT +2. The time now is 00:44.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.