Page MenuHomePhabricator

Recent changes table locked and causing "Database error" when many deletions happen
Closed, ResolvedPublic



When I'm deleting items on Wikidata too fast (many items within short timeframe), I get a database error. I'm using a "flooder" user group.

A database query error has occurred. This may indicate a bug in the software.

Function: RecentChange::save

Error: 1213 Deadlock found when trying to get lock; try restarting transaction (

See especially the last comment by Adam Shorland (WMDE).

Version: 1.23.0
Severity: major



Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 2:19 AM
bzimport set Reference to bz56776.
bzimport added a subscriber: Unknown Object (MLST).

RecentChanges::save is also called for flooders, because also actions by flooders are in the recent changes, there are only marked as bot and therefor needs change of the filter to show bot edits. Same for watchlist.

Today I got the same error message on the Finnish Wikipedia, so it's not related to Wikidata nor flooders user group.

I see this on Commons, likely due to FileDeleteForm calling doDeleteArticleReal(), telling it to keep the transaction open and then deleting the file (slow) and committing afterwards.

Change 138677 had a related patch set uploaded by Aaron Schulz:
Reduce deadlocks adding log rows to the RC table on delete

Change 138677 merged by jenkins-bot:
Reduce deadlocks adding log rows to the RC table on delete