ActiveRecord::Deadlocked

Deadlocked will be raised when a transaction is rolled back by the database when a deadlock is encountered.