Forums

Suddenly recieving MySQL (1205, 'Lock wait timeout exceeded; try restarting transaction')

Hi PA,

Today my django web app suddenly started producting (1205, 'Lock wait timeout exceeded; try restarting transaction') errors am unsure of what the cause might be. I haven't changed the codebase in some time and am not sure how to debug this since it seems to be happening on more than one view (i.e when attempting to logout or get a notification count which both typically only take 0.150 seconds or less). I went through the forums and then tried to run the SHOW PROCESSLIST command in the mysql console and this was my result:

| ... | xDev | ... | xDev$MyDb | Query | 0 | starting | SHOW FULL PROCESSLIST |

Do you have any ideas on why this would suddenly start happening?

Thank you for your time!

Your database is on a server that seems quite busy recently -- when exactly those errors start showing? Are you getting it regularily or only sometimes? I see there was a spike of activity yesterday from around 19:33 to 19:42 (so before you posted here) that might cause that.

Hi Pafk,

Thank for getting back ot me. This only started happening yesterday and occured five times at the following times:

  • 17:30 UTC
  • 17:32 UTC
  • 19:37 UTC
  • 19:39 UTC
  • 19:43 UTC

Thanks for the details. We have some plans to reduce the load on that machine, so we should have it working well again soon.

Glad to hear and thank you for your guys help!

Take a look this afternoon and let us know if it's better.

Hi fjl,

Wanted to follow up and let you know that the I haven't had any problems and, on top of that, the site seems to be responding faster than before. Thanks for your help PA!

Excellent -- thanks for letting us know!