This article explains how to detect and resolve database locks created by a rails application. The steps relate to MySQL but could be adapted for any other backend (e.g. Postgres).
...
Table of Contents | ||
---|---|---|
|
...
1 - Typical Symptoms
Due to long running locks (e.g.: lock while ssh-ing a compute rack which is unavailable), you may one day end up with the following error while trying to save a record:
...
This means that the record is currently locked by a MySQL process.
...
2 - Clearing the lock from the Rails console
You can perform the following in order to kill the offending process:
...