Page MenuHomePhabricator

Wikimedia\\Rdbms\\Database::close: mass commit/rollback of peer transaction required (DBO_TRX set)
Open, Stalled, Needs TriagePublicBUG REPORT

Description

Steps to Reproduce:

When I edit a page and take a long time to update it and save it I get this error. Please note that this does not always happen, only sometimes.
Running Mediawiki 1.31.1 (52af0e7) 2019-03-07T07:42:07

Actual Results:

Receive these entries in the logs after the front-end receives a 500 error.

Uncaught Wikimedia\\Rdbms\\DBUnexpectedError:
Wikimedia\\Rdbms\\Database::close: mass commit/rollback of peer transaction required (DBO_TRX set). in /var/www/wiki.domain.com/includes/libs/rdbms/database/Database.php:916
Stack trace:
#0 /var/www/wiki.domain.com/includes/libs/rdbms/loadbalancer/LoadBalancer.php(1217): Wikimedia\\Rdbms\\Database->close()
#1 [internal function]: Wikimedia\\Rdbms\\LoadBalancer->Wikimedia\\Rdbms\\{closure}(Object(Wikimedia\\Rdbms\\DatabaseMysqli))
#2 /var/www/wiki.domain.com/includes/libs/rdbms/loadbalancer/LoadBalancer.php(1640): call_user_func_array(Object(Closure), Array)
#3 /var/www/wiki.domain.com/includes/libs/rdbms/loadbalancer/LoadBalancer.php(1218): Wikimedia\\Rdbms\\LoadBalancer->forEachOpenConnection(Object(Closure))
#4 /var/www/wiki.domain.com/includes/libs/rdbms/loadbalancer/LoadBalancer.php(1208): Wikimedia\\Rdbms\\LoadBalancer->closeAll()
#5 /var/www/wiki.domain.com/includes/libs/rdbms/loadbalancer/LoadBalancer.php(1860): Wikimedia\\Rdbms\\LoadBalancer->disable()
#6 [internal fu in /var/www/wiki.domain.com/includes/libs/rdbms/database/Database.php on line 916,
referer: https://wiki.domain.com/

Expected Results:

The expected results are that the page needs to save and not give the error.

Details

Related Gerrit Patches:

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptMar 7 2019, 8:27 AM
Krinkle added a subscriber: Krinkle.

@Riaanolivier This error usually indicates that an extension has tried to cancel a database write without informing the LoadBalancer object. If that is the case here, then this is a bug in one the extensions you have installed.

Please check which extensions have installed, and which version of MySQL you use (can be found via the "Special:Version" page on your wiki). Also, it would help if you could try it when the extensions are disabled. If that works, try enabling them and narrow down the cause that way.

Krinkle changed the task status from Open to Stalled.Apr 3 2019, 2:07 AM

Change 533132 had a related patch set uploaded (by Aaron Schulz; owner: Aaron Schulz):
[mediawiki/core@master] rdbms: expand on LoadBalancer ownership concept

https://gerrit.wikimedia.org/r/533132

Restricted Application added a project: Core Platform Team. · View Herald TranscriptAug 29 2019, 10:35 AM
Krinkle moved this task from Untriaged to Rdbms library on the Wikimedia-Rdbms board.

Change 533132 merged by jenkins-bot:
[mediawiki/core@master] rdbms: expand on LoadBalancer ownership concept

https://gerrit.wikimedia.org/r/533132