Splitting off from T130204, this is probably a separate issue.
In T130204#2130802, @ori wrote:2016-03-17 11:39:20 mw1200 commonswiki 1.27.0-wmf.17 exception ERROR: [d1f325d3] /w/api.php?action=query&format=json&prop=stashimageinfo&siifilekey=13vted7b2nlk%2Exchznz%2E79828%2Ejpg&siiprop=url&siiurlwidth=100&siiurlheight=100 UploadStashNotLoggedInException from line 126 of /srv/mediawiki/php-1.27.0-wmf.17/includes/upload/UploadStash.php: UploadStash::getFile No user is logged in, files must belong to users {"exception_id":"d1f325d3"} [Exception UploadStashNotLoggedInException] (/srv/mediawiki/php-1.27.0-wmf.17/includes/upload/UploadStash.php:126) UploadStash::getFile No user is logged in, files must belong to users #0 /srv/mediawiki/php-1.27.0-wmf.17/includes/api/ApiQueryStashImageInfo.php(57): UploadStash->getFile(string) #1 /srv/mediawiki/php-1.27.0-wmf.17/includes/api/ApiQuery.php(250): ApiQueryStashImageInfo->execute() #2 /srv/mediawiki/php-1.27.0-wmf.17/includes/api/ApiMain.php(1359): ApiQuery->execute() #3 /srv/mediawiki/php-1.27.0-wmf.17/includes/api/ApiMain.php(462): ApiMain->executeAction() #4 /srv/mediawiki/php-1.27.0-wmf.17/includes/api/ApiMain.php(433): ApiMain->executeActionWithErrorHandling() #5 /srv/mediawiki/php-1.27.0-wmf.17/api.php(83): ApiMain->execute() #6 /srv/mediawiki/w/api.php(3): include(string) #7 {main}
Even if there's someone not logged in requesting specific uploads from stash, which is unlikely, this shouldn't be throwing exceptions.