List:Internals« Previous MessageNext Message »
From:Benjamin Pflugmann Date:July 3 2001 6:49pm
Subject:Re: idle connections
View as plain text  

On Tue, Jul 03, 2001 at 01:20:19PM -0500, russ@stripped wrote:
> However you will find that there is a variable that declares connection
> times.
> When a connection to mysql is not closed, it sits idle sleeping,
> waiting for a specific close call or more queries.
> The default wait time is 8 hours.
> Also the default number of simutaneeous connections is 100
> You can change these values my specifing the following in my.cnf
> set-variable    = max_connections=<number of simutaneous connections>
> set-variable    = wait_timeout=<timeout in seconds>

Well, sorry, I should have been more specific. I know about both,
wait_timeout and max_connections, and as I said in my first mail, the
correct solution would have been to choose more sensible values at the
beginning. And there are other solutions, too (like disabling
persistent connections for mod_auth_mysql and alike)

The point I wanted to make is that I had a complete outage just
because 200 slots were occupied with idle connections, of which about
100 were from mod_auth_mysql which I wouldn't have cared a bit if they
got killed (the other 100 would have done an automatic reconnect).

In short, IMHO accepting to kill single, idle connections seems better
than to accept a complete denial of service. Of course, the next step
should be to correct the configuration.



idle connectionsBenjamin Pflugmann3 Jul
  • Re: idle connectionsSasha Pachev3 Jul
  • Re: idle connectionsRussell E Glaue3 Jul
    • Re: idle connectionsBenjamin Pflugmann3 Jul
      • Re: idle connectionsJeremy Zawodny3 Jul
        • recycle-idle-connection theory - Re: idle connectionsRussell E Glaue3 Jul
          • Re: recycle-idle-connection theory - Re: idle connectionsJeremy Zawodny3 Jul
  • idle connectionsMichael Widenius4 Jul
    • Re: idle connectionsBenjamin Pflugmann4 Jul
  • Re: idle connectionsSinisa Milivojevic4 Jul
    • Re: idle connectionsBenjamin Pflugmann4 Jul