Page MenuHomePhabricator

Wikimedia\Rdbms\DBQueryError: Error 1062: Duplicate entry 'Savannah_River_(26769689014).jpg' for key 'file_name'Function: MediaWiki\FileRepo\File\LocalFile::acquireFileIdFromNameQuery: INSERT INTO `file` (file_name,file_lates
Open, Needs TriagePublicPRODUCTION ERROR

Description

Error
  • service.version: 1.46.0-wmf.16
  • timestamp: 2026-02-20T16:14:09.560Z
  • labels.phpversion: 8.3.30
  • trace.id: 81d308b0-1afe-4cad-bb0b-2aea7cd55d9f
  • Find trace.id in Logstash
labels.normalized_message
[{reqId}] {exception_url}   Wikimedia\Rdbms\DBQueryError: Error 1062: Duplicate entry 'Savannah_River_(26769689014).jpg' for key 'file_name'
Function: MediaWiki\FileRepo\File\LocalFile::acquireFileIdFromName
Query: INSERT INTO `file` (file_name,file_lates
FrameLocationCall
from/srv/mediawiki/php-1.46.0-wmf.16/includes/libs/Rdbms/Database/Database.php(1226)
#0/srv/mediawiki/php-1.46.0-wmf.16/includes/libs/Rdbms/Database/Database.php(1210)Wikimedia\Rdbms\Database->getQueryException(string, int, string, string)
#1/srv/mediawiki/php-1.46.0-wmf.16/includes/libs/Rdbms/Database/Database.php(1184)Wikimedia\Rdbms\Database->getQueryExceptionAndLog(string, int, string, string)
#2/srv/mediawiki/php-1.46.0-wmf.16/includes/libs/Rdbms/Database/Database.php(641)Wikimedia\Rdbms\Database->reportQueryError(string, int, string, string, bool)
#3/srv/mediawiki/php-1.46.0-wmf.16/includes/libs/Rdbms/Database/Database.php(1506)Wikimedia\Rdbms\Database->query(Wikimedia\Rdbms\Query, string)
#4/srv/mediawiki/php-1.46.0-wmf.16/includes/libs/Rdbms/Database/DBConnRef.php(129)Wikimedia\Rdbms\Database->insert(string, array, string, array)
#5/srv/mediawiki/php-1.46.0-wmf.16/includes/libs/Rdbms/Database/DBConnRef.php(457)Wikimedia\Rdbms\DBConnRef->__call(string, array)
#6/srv/mediawiki/php-1.46.0-wmf.16/includes/libs/Rdbms/QueryBuilder/InsertQueryBuilder.php(317)Wikimedia\Rdbms\DBConnRef->insert(string, array, string, array)
#7/srv/mediawiki/php-1.46.0-wmf.16/includes/FileRepo/File/LocalFile.php(834)Wikimedia\Rdbms\InsertQueryBuilder->execute()
#8/srv/mediawiki/php-1.46.0-wmf.16/includes/FileRepo/File/LocalFile.php(1961)MediaWiki\FileRepo\File\LocalFile->acquireFileIdFromName()
#9/srv/mediawiki/php-1.46.0-wmf.16/includes/FileRepo/File/LocalFile.php(1838)MediaWiki\FileRepo\File\LocalFile->recordUpload3(string, string, string, MediaWiki\User\User, array, string, array, bool, bool)
#10/srv/mediawiki/php-1.46.0-wmf.16/includes/Upload/UploadBase.php(873)MediaWiki\FileRepo\File\LocalFile->upload(string, string, string, int, array, bool, MediaWiki\User\User, array)
#11/srv/mediawiki/php-1.46.0-wmf.16/includes/Api/ApiUpload.php(1112)MediaWiki\Upload\UploadBase->performUpload(string, string, bool, MediaWiki\User\User, array, string)
#12/srv/mediawiki/php-1.46.0-wmf.16/includes/Api/ApiUpload.php(275)MediaWiki\Api\ApiUpload->performUpload(array)
#13/srv/mediawiki/php-1.46.0-wmf.16/includes/Api/ApiUpload.php(173)MediaWiki\Api\ApiUpload->getContextResult()
#14/srv/mediawiki/php-1.46.0-wmf.16/includes/Api/ApiMain.php(2060)MediaWiki\Api\ApiUpload->execute()
#15/srv/mediawiki/php-1.46.0-wmf.16/includes/Api/ApiMain.php(965)MediaWiki\Api\ApiMain->executeAction()
#16/srv/mediawiki/php-1.46.0-wmf.16/includes/Api/ApiMain.php(936)MediaWiki\Api\ApiMain->executeActionWithErrorHandling()
#17/srv/mediawiki/php-1.46.0-wmf.16/includes/Api/ApiEntryPoint.php(138)MediaWiki\Api\ApiMain->execute()
#18/srv/mediawiki/php-1.46.0-wmf.16/includes/MediaWikiEntryPoint.php(180)MediaWiki\Api\ApiEntryPoint->execute()
#19/srv/mediawiki/php-1.46.0-wmf.16/api.php(30)MediaWiki\MediaWikiEntryPoint->run()
#20/srv/mediawiki/w/api.php(3)require(string)
#21{main}
Impact
Notes

Details

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

Related Objects

View Standalone Graph
This task is connected to more than 200 other tasks. Only direct parents and subtasks are shown here. Use View Standalone Graph to show more of the graph.

Event Timeline

Is there a problem with this particular file? (it has been uploaded by my bot)

Is there a problem with this particular file? (it has been uploaded by my bot)

The same error also appeared for FS-FrancisMarionSumter-009_(34635516240).jpg, Savannah_River_(34212360033).jpg and Savannah_River_(34982852306).jpg.

But no idea what happened.

My bot didn't face any particular error from the API when the file has been uploaded then its SDC modified:

2026-02-20T16:14:02.164Z  INFO 359084 --- [media-update-usda.flickr] [                                                 ] o.w.c.d.s.s.wikimedia.CommonsService     : Uploading https://live.staticflickr.com/7579/26769689014_c68fca509b_o.jpg by URL as Savannah River (26769689014).jpg.. 
2026-02-20T16:14:08.785Z  INFO 359084 --- [media-update-usda.flickr] [                                                 ] o.w.c.d.s.s.wikimedia.CommonsService     : Upload of https://live.staticflickr.com/7579/26769689014_c68fca509b_o.jpg as Savannah River (26769689014).jpg: UploadApiResponse [upload=UploadResponse[offset=0, result=Success, filename=Savannah_River_(26769689014).jpg, filekey=null, imageInfo=ImageInfo [timestamp=2026-02-20T16:14:08Z, user=OptimusPrimeBot, userId=9136843, size=855740, width=3872, height=2592, canonicalTitle=File:Savannah River (26769689014).jpg, url=https://upload.wikimedia.org/wikipedia/commons/b/b5/Savannah_River_%2826769689014%29.jpg, descriptionUrl=https://commons.wikimedia.org/wiki/File:Savannah_River_(26769689014).jpg, sha1=cad01ae4c09d12f688546d924de369859cd81a3e, mime=image/jpeg, mediatype=BITMAP, bitDepth=8]], ]
2026-02-20T16:14:08.878Z  INFO 359084 --- [media-update-usda.flickr] [                                                 ] o.w.c.d.s.s.wikimedia.CommonsService     : Editing SDC http://commons.wikimedia.org/entity/M184583216 (media-info) of Savannah_River_(26769689014).jpg...
2026-02-20T16:14:09.298Z  INFO 359084 --- [media-update-usda.flickr] [                                                 ] o.w.c.d.s.s.wikimedia.CommonsService     : SDC edit of http://commons.wikimedia.org/entity/M184583216 (media-info) done