From: Markus Falb Date: October 12 2012 1:39pm Subject: Re: innodb_lock_wait_timeout List-Archive: http://lists.mysql.com/mysql/228378 Message-Id: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigCC8E1F65105989A81B7E0589" --------------enigCC8E1F65105989A81B7E0589 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 11.10.2012 14:43, Johan De Meersman wrote: >=20 > ----- Original Message ----- >> From: "Markus Falb" >> >> But why is retrying better than raising the value? >> >> So what is better, adjusting the timeout or retrying application side >> and why? >=20 > Well, raising the timeout would probably help, but may cause more concu= rrent connections to stay open until they block the server. >=20 > The idea of retrying is that everything you've done before that particu= lar transaction has already been committed, so you (probably) can't easil= y undo it. A retry gives you a chance to still finish what you were doing= with no other loss than some time waiting. Regardless of how many retrie= s fail, you will still be in the same position as you were when the first= attempt failed. 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? I still don't get it. --=20 Kind Regards, Markus Falb --------------enigCC8E1F65105989A81B7E0589 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.17 (Darwin) Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Mozilla - http://www.enigmail.net/ iEYEARECAAYFAlB4HaUACgkQYoWFBIJE9eVBmACeI85eOaYi3WfNus2l8v0BUKK3 ApUAnik7+YrRSoj7UwjybZf/LyQruLyU =Zi3P -----END PGP SIGNATURE----- --------------enigCC8E1F65105989A81B7E0589--