List:Internals« Previous MessageNext Message »
From:Benjamin Pflugmann Date:July 4 2001 2:59pm
Subject:Re: idle connections
View as plain text  

On Wed, Jul 04, 2001 at 04:45:06AM +0300, monty@stripped wrote:
> >>>>> "Benjamin" == Benjamin Pflugmann <philemon@stripped>
> writes:
> Benjamin> Although the original problem has been max_connections beeing to low,
> Benjamin> I thought it would be a nice idea, to automatically kill the most idle
> Benjamin> connection (if there is one), whenever the connection limit is reached
> Benjamin> - and of course complain in the error log about it.
> One problem is with this idea is that if you start getting a lot of
> new connections so that you are constantly starting/releasing
> connections you will run into the same problems as one tries to solve
> with persistent connections in the first place.

Yes, of course. That's why I suggested to complain in the error log -
it's an exception to the "normal" behaviour. I guess it would be a
good idea to specify how long a connection must have been sleeping
before it is allowed to be killed, something like (I know the name is
not the best one)

kill_sleeping_only_after = 60

which would only try to kill the longest sleeping connection, if it
already sleeps more than 60 seconds.

> This could however be an optional behaveour one could set with an
> option.

Optional, of course, but...

In principle I agree with you, that such a behaviour should be
explicitly enabled, on the other hand, I meant it mainly as way for
MySQL to act more reasonable when the configuration is not tuned well
enough, which contradicts the assumption that the user has enabled it



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