Page MenuHomePhabricator

MediaWiki\Upload\Exception\UploadChunkFileException: Error storing file in '{chunkPath}': backend-fail-internal; local-swift-codfw
Closed, ResolvedPublicPRODUCTION ERROR

Description

Error
  • service.version: 1.47.0-wmf.9
  • timestamp: 2026-07-02T13:38:43.499Z
  • labels.phpversion: 8.3.31
  • trace.id: a4b3cc9d-ae54-4383-a150-7ff8d29fc15e
  • Find trace.id in Logstash
labels.normalized_message
[{reqId}] {exception_url}   MediaWiki\Upload\Exception\UploadChunkFileException: Error storing file in '{chunkPath}': backend-fail-internal; local-swift-codfw
FrameLocationCall
from/srv/mediawiki/php-1.47.0-wmf.9/includes/Upload/UploadFromChunks.php(441)
#0/srv/mediawiki/php-1.47.0-wmf.9/includes/Upload/UploadFromChunks.php(342)MediaWiki\Upload\UploadFromChunks->outputChunk(string)
#1/srv/mediawiki/php-1.47.0-wmf.9/includes/Api/ApiUpload.php(428)MediaWiki\Upload\UploadFromChunks->addChunk(string, int, int)
#2/srv/mediawiki/php-1.47.0-wmf.9/includes/Api/ApiUpload.php(296)MediaWiki\Api\ApiUpload->getChunkResult(array)
#3/srv/mediawiki/php-1.47.0-wmf.9/includes/Api/ApiUpload.php(171)MediaWiki\Api\ApiUpload->getContextResult()
#4/srv/mediawiki/php-1.47.0-wmf.9/includes/Api/ApiMain.php(2049)MediaWiki\Api\ApiUpload->execute()
#5/srv/mediawiki/php-1.47.0-wmf.9/includes/Api/ApiMain.php(947)MediaWiki\Api\ApiMain->executeAction()
#6/srv/mediawiki/php-1.47.0-wmf.9/includes/Api/ApiMain.php(918)MediaWiki\Api\ApiMain->executeActionWithErrorHandling()
#7/srv/mediawiki/php-1.47.0-wmf.9/includes/Api/ApiEntryPoint.php(138)MediaWiki\Api\ApiMain->execute()
#8/srv/mediawiki/php-1.47.0-wmf.9/includes/MediaWikiEntryPoint.php(180)MediaWiki\Api\ApiEntryPoint->execute()
#9/srv/mediawiki/php-1.47.0-wmf.9/api.php(30)MediaWiki\MediaWikiEntryPoint->run()
#10/srv/mediawiki/w/api.php(3)require(string)
#11{main}
Notes
  • Happens 10×/day in production on commons upload
  • Unsure the right team to flag this for, flagged the infra and core teams, retag as appropriate!

Details

Request URL
https://commons.wikimedia.org/w/api.php?action=upload
Related Changes in Gerrit:

Event Timeline

The more useful message is logged in the FileOperation channel, which has its own dashboard. (The exception should probably contain it somehow.) It's mostly Swift HTTP 503s, with a few 504s thrown in. So I don't think much can be done here on the MediaWiki side.

JTweed-WMF triaged this task as Medium priority.Jul 9 2026, 9:43 AM
JTweed-WMF lowered the priority of this task from Medium to Low.
Samwilson subscribed.

There's probably nothing to be done to fix the actual failure on the Swift side, but UploadApi returns stashfailed for other issues, so perhaps should for this error also.

Change #1311310 had a related patch set uploaded (by Samwilson; author: Samwilson):

[mediawiki/core@master] Upload: Do not throw for chunk output failures

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

Change #1311420 had a related patch set uploaded (by Ladsgroup; author: Samwilson):

[mediawiki/core@wmf/1.47.0-wmf.11] Upload: Do not throw for failure to save a chunk file

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

Change #1311310 merged by jenkins-bot:

[mediawiki/core@master] Upload: Do not throw for failure to save a chunk file

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

Change #1311420 merged by jenkins-bot:

[mediawiki/core@wmf/1.47.0-wmf.11] Upload: Do not throw for failure to save a chunk file

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

Mentioned in SAL (#wikimedia-operations) [2026-07-16T22:17:32Z] <ladsgroup@deploy2003> Started scap sync-world: Backport for [[gerrit:1311420|Upload: Do not throw for failure to save a chunk file (T430986)]], [[gerrit:1311529|AddImage: Request only standard thumbnail sizes (T428797)]]

Mentioned in SAL (#wikimedia-operations) [2026-07-16T22:19:19Z] <ladsgroup@deploy2003> ladsgroup, urbanecm: Backport for [[gerrit:1311420|Upload: Do not throw for failure to save a chunk file (T430986)]], [[gerrit:1311529|AddImage: Request only standard thumbnail sizes (T428797)]] synced to the testservers (see https://wikitech.wikimedia.org/wiki/Mwdebug). Changes can now be verified there.

Mentioned in SAL (#wikimedia-operations) [2026-07-16T22:26:23Z] <ladsgroup@deploy2003> Finished scap sync-world: Backport for [[gerrit:1311420|Upload: Do not throw for failure to save a chunk file (T430986)]], [[gerrit:1311529|AddImage: Request only standard thumbnail sizes (T428797)]] (duration: 08m 51s)

This is not throwing any more. (The failures are still being logged, but the front end can retry in the normal way now.)

image.png (905×246 px, 16 KB)