Leave a comment at the end of this page or email contact@krishagni.com
When does the "Lock wait timeout exceeded" error occur?
Introduction
Lock wait timeout exceeded error typically occurs when a long-running transaction is in progress, such as:
Bulk imports
Deleting a Collection Protocol (CP) or large containers or many specimens
Any other operation that locks multiple database tables for an extended time
During such operations:
All relevant tables are locked until the transaction completes.
If another user or process tries to access the same locked tables, the system waits
If the wait exceeds the DB's timeout, it fails with the error:
"Lock wait timeout exceeded; try restarting transaction"
Contributing Factors
Several factors can increase the likelihood of this error:
Size of the import – Large files take longer to process and lock more data
Pre validation size setting –
Navigate To → Setting → 'Pre-validate Records Limit'Higher values mean longer locksOverall transaction duration – Operations exceeding 1 minute are considered large
Bulk deletion – Removing many containers, cps, specimens… etc
Recommended Workaround
To reduce the chances of this error:
Run bulk operations during off-peak hours (e.g., lunch or after hours)
Reduce the validation batch size under Settings > Bulk Import
Avoid simultaneous heavy operations (e.g., importing + deleting)
Leave a comment at the end of this page or email contact@krishagni.com