Page MenuHomePhabricator

Wikimedia\Rdbms\DBTransactionSizeError: Transaction spent {time}s in writes, exceeding the 3s limit
Open, Needs TriagePublicPRODUCTION ERROR

Description

Error
  • service.version: 1.45.0-wmf.20
  • timestamp: 2025-09-25T14:53:50.494Z
  • labels.phpversion: 8.1.33
  • trace.id: b5f9ede4-39b2-4a47-9432-2cf2ed628a95
  • Find trace.id in Logstash
labels.normalized_message
[{reqId}] {exception_url}   Wikimedia\Rdbms\DBTransactionSizeError: Transaction spent {time}s in writes, exceeding the 3s limit
FrameLocationCall
from/srv/mediawiki/php-1.45.0-wmf.20/includes/libs/rdbms/loadbalancer/LoadBalancer.php(1412)
#0/srv/mediawiki/php-1.45.0-wmf.20/includes/libs/rdbms/lbfactory/LBFactory.php(330)Wikimedia\Rdbms\LoadBalancer->approvePrimaryChanges(int, string)
#1/srv/mediawiki/php-1.45.0-wmf.20/includes/MediaWikiEntryPoint.php(294)Wikimedia\Rdbms\LBFactory->commitPrimaryChanges(string, int)
#2/srv/mediawiki/php-1.45.0-wmf.20/includes/MediaWikiEntryPoint.php(187)MediaWiki\MediaWikiEntryPoint->commitMainTransaction()
#3/srv/mediawiki/php-1.45.0-wmf.20/includes/MediaWikiEntryPoint.php(170)MediaWiki\MediaWikiEntryPoint->doPrepareForOutput()
#4/srv/mediawiki/php-1.45.0-wmf.20/includes/MediaWiki.php(87)MediaWiki\MediaWikiEntryPoint->prepareForOutput()
#5/srv/mediawiki/php-1.45.0-wmf.20/includes/api/ApiMain.php(986)MediaWiki::preOutputCommit(MediaWiki\Context\DerivativeContext)
#6/srv/mediawiki/php-1.45.0-wmf.20/includes/api/ApiMain.php(929)MediaWiki\Api\ApiMain->executeActionWithErrorHandling()
#7/srv/mediawiki/php-1.45.0-wmf.20/includes/api/ApiEntryPoint.php(152)MediaWiki\Api\ApiMain->execute()
#8/srv/mediawiki/php-1.45.0-wmf.20/includes/MediaWikiEntryPoint.php(198)MediaWiki\Api\ApiEntryPoint->execute()
#9/srv/mediawiki/php-1.45.0-wmf.20/api.php(44)MediaWiki\MediaWikiEntryPoint->run()
#10/srv/mediawiki/w/api.php(3)require(string)
#11{main}
Impact
Notes

24 cases in last 8 hours. We already observed something similar couple years ago - T314057.
Tagging MW-Interfaces-Team as this error is triggered via request to api.php

Details

Request URL
https://commons.wikimedia.org/w/api.php

Event Timeline

BPirkle subscribed.

Unclear whether this is actually an API issue, or an issue with underlying code belonging to another team. Moving to our Bugs & Chores column for investigation, but we have no set time frame for that. If anyone else is inclined to investigate first, feel free.

These should be bucketed by endpoint (REST path, or api.php action or index.php action). The relevant "performance" entries of the "rdbms" channel might be helpful to.