ActiveRecord::StatementInvalid: Mysql::Error: Lock wait timeout exceeded;
try restarting transaction: UPDATE users SET updated_at = ‘2009-12-28
14:31:50’, active_till = ‘2009-12-28 14:31:50’ WHERE id = 21
The problem is not that update. The problem is that something else was
causing that row (and probably others) to be locked for long enough
that mysql gave up waiting to be able to get a lock for writing. What
else is happening at the time that might cause this ?
@Frederick
*
*
*After debug i found that Ferret index update is the cause, any views ?
*
I know very little about ferret, however in general you might try to
either do the index update in smaller chunks (so that any given row is
not locked for too long) or setup a slave database and do index
rebuilds against the slave database.