to select ↑↓ to navigate
Cloud

Cloud

Open in ChatGPT
Ask ChatGPT about this page
Open in Claude
Ask Claude about this page

Lock wait timeout exceeded error

Sometimes you may run into this particular error

frappe.exceptions.QueryTimeoutError: (1205, 'Lock wait timeout exceeded; try restarting transaction')

This usually indicates a bug in your application. In such cases, you should review your application for locks it holds.
To understand locks, you should also understand Frappe's transaction model first.
Any writes or read with for_update performed locks the document. If job is running and other transaction (web or background job) tries to access the same doc, it will get a timeout unless the current job updating the rows commits or rolls back the transactions

You should review the process list while the error happens to see what the running queries are https://docs.frappe.io/cloud/site-process-list

Last updated 1 week ago
Was this helpful?
Thanks!