----- Original Message ----- > From: "Markus Falb" <markus.f...@fasel.at> > > 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 - http://lbw2012.tuxera.be -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/mysql