List:General Discussion« Previous MessageNext Message »
From:Johan De Meersman Date:October 15 2012 9:00am
Subject:Re: innodb_lock_wait_timeout
View as plain text  
----- Original Message -----
> From: "Markus Falb" <markus.falb@stripped>
> With a low timeout the connection will be terminated sooner, but if
> the application retries another connection is taken. I could have raised
> the timeout with the same effect on the db side (1 process is waiting)
> but maybe more performant (no new connection necessary) and with simpler
> logic on the application side (no retry logic)
> Maybe you imply that there is some kind of sleep before the retry, so
> that other statements could be fulfilled?

No, a *lock* timeout does not kill your connection, it merely rolls back the active
transaction. You do not need another connection, as you haven't lost the current one.

You can of course close the connection and sleep for a moment to allow other clients time
to do stuff, too; but then you lose any local session state you had (like sql variables
that you may have set). Besides, if your server is so busy that you can't spare the time
for a retry on a failed connection, it may be time to start looking for ways to extend
capacity, too.

Linux Bier Wanderung 2012, now also available in Belgium!
August, 12 to 19, Diksmuide, Belgium -
innodb_lock_wait_timeoutMarkus Falb11 Oct
  • Re: innodb_lock_wait_timeoutJohan De Meersman11 Oct
    • Re: innodb_lock_wait_timeoutAndrĂ©s Tello11 Oct
      • Re: innodb_lock_wait_timeoutAkshay Suryavanshi11 Oct
        • RE: innodb_lock_wait_timeoutRick James11 Oct
    • Re: innodb_lock_wait_timeoutMarkus Falb12 Oct
      • Re: innodb_lock_wait_timeoutReindl Harald12 Oct
        • Re: innodb_lock_wait_timeoutMichael Dykman12 Oct
      • Re: innodb_lock_wait_timeoutJohan De Meersman15 Oct
  • Re: innodb_lock_wait_timeoutPerrin Harkins11 Oct
Re: innodb_lock_wait_timeoutJohan De Meersman15 Oct