Error
Request ID: AWhbdKDxzpjgITg6aL2N
A database query error has occurred. Did you forget to run your application's database schema updater after upgrading? Query: INSERT INTO `page_restrictions` (pr_page,pr_type,pr_level,pr_cascade,pr_expiry) VALUES ('xxx','xxx','xxx','xxx','xxx') Function: WikiPage::doUpdateRestrictions Error: 1213 Deadlock found when trying to get lock; try restarting transaction
#0 /srv/mediawiki/php-1.33.0-wmf.12/includes/libs/rdbms/database/Database.php(1476): Wikimedia\Rdbms\Database->makeQueryException(string, integer, string, string) #1 /srv/mediawiki/php-1.33.0-wmf.12/includes/libs/rdbms/database/Database.php(1236): Wikimedia\Rdbms\Database->reportQueryError(string, integer, string, string, boolean) #2 /srv/mediawiki/php-1.33.0-wmf.12/includes/libs/rdbms/database/Database.php(2068): Wikimedia\Rdbms\Database->query(string, string) #3 /srv/mediawiki/php-1.33.0-wmf.12/includes/page/WikiPage.php(2295): Wikimedia\Rdbms\Database->insert(string, array, string) #4 /srv/mediawiki/php-1.33.0-wmf.12/includes/api/ApiProtect.php(114): WikiPage->doUpdateRestrictions(array, array, boolean, string, User, NULL) #5 /srv/mediawiki/php-1.33.0-wmf.12/includes/api/ApiMain.php(1596): ApiProtect->execute() #6 /srv/mediawiki/php-1.33.0-wmf.12/includes/api/ApiMain.php(531): ApiMain->executeAction() #7 /srv/mediawiki/php-1.33.0-wmf.12/includes/api/ApiMain.php(502): ApiMain->executeActionWithErrorHandling() #8 /srv/mediawiki/php-1.33.0-wmf.12/api.php(87): ApiMain->execute() #9 /srv/mediawiki/w/api.php(3): include(string) #10 {main}
Impact
Unknown, happened 19 times in the last 7 days, 15 of which have been triggered by me.
Notes
I got this error while using a massblock script which also edits and protects user page and talk of the blocked users. Running the script with 15 users returned this error for some of them.