Under high load, for large sites with lots of user sessions, errors can appear on deleting from the login_security_track table.
PDOException: SQLSTATE[40001]: Serialization failure: 1213 Deadlock found when trying to get lock; try restarting transaction: DELETE FROM {login_security_track} #012WHERE (timestamp < :db_condition_placeholder_0) ; Array#012(#012 [:db_condition_placeholder_0] => 1508860674#012)#012 in _login_security_remove_all_events() (line 350 of /…/sites/all/modules/contrib/login_security/login_security.module)
The _login_security_remove_all_events() function probably needs to lock_acquire() before executing the db_delete. Patch to follow.
Comment | File | Size | Author |
---|---|---|---|
#2 | 2919806-1.login_security_remove_all_events_locking.patch | 629 bytes | joe-b |
Comments
Comment #2
joe-b CreditAttribution: joe-b commentedHere's the patch.
Comment #3
joe-b CreditAttribution: joe-b at Convivio commented