It seems that the extension1 database for labswiki is always overloaded. This means that files being uploaded to labswiki cannot be scanned by the MediaModeration scanning script as the reference to the image is never added to the mediamoderation_scan table stored on extension1.
While this could be deliberate to avoid overloading the DB, I am not convinced of this as other wikis (such as commonswiki) are not having this problem consistently. Connecting to the DB on mwmaint using sql labswiki --cluster=extension1 suggests that the DB is up.
Error
All events matching this are at https://logstash.wikimedia.org/goto/f710796edb768a691fa320f2e2217d02
[{reqId}] {exception_url} Wikimedia\Rdbms\DBUnexpectedError: Database servers in extension1 are overloaded. In order to protect application servers, the circuit breaking to databases of this section have been activated. Please try again a few seconds.
from /srv/mediawiki/php-1.43.0-wmf.7/includes/libs/rdbms/loadmonitor/LoadMonitor.php(124) #0 /srv/mediawiki/php-1.43.0-wmf.7/includes/libs/rdbms/loadbalancer/LoadBalancer.php(455): Wikimedia\Rdbms\LoadMonitor->scaleLoads(array) #1 /srv/mediawiki/php-1.43.0-wmf.7/includes/libs/rdbms/loadbalancer/LoadBalancer.php(781): Wikimedia\Rdbms\LoadBalancer->getReaderIndex(string) #2 /srv/mediawiki/php-1.43.0-wmf.7/includes/libs/rdbms/database/DBConnRef.php(110): Wikimedia\Rdbms\LoadBalancer->getConnectionInternal(integer, array, string, integer) #3 /srv/mediawiki/php-1.43.0-wmf.7/includes/libs/rdbms/database/DBConnRef.php(124): Wikimedia\Rdbms\DBConnRef->ensureConnection() #4 /srv/mediawiki/php-1.43.0-wmf.7/includes/libs/rdbms/database/DBConnRef.php(341): Wikimedia\Rdbms\DBConnRef->__call(string, array) #5 /srv/mediawiki/php-1.43.0-wmf.7/includes/libs/rdbms/querybuilder/SelectQueryBuilder.php(748): Wikimedia\Rdbms\DBConnRef->selectField(array, string, array, string, array, array) #6 /srv/mediawiki/php-1.43.0-wmf.7/extensions/MediaModeration/src/Services/MediaModerationDatabaseLookup.php(41): Wikimedia\Rdbms\SelectQueryBuilder->fetchField() #7 /srv/mediawiki/php-1.43.0-wmf.7/extensions/MediaModeration/src/Hooks/Handlers/UploadCompleteHandler.php(69): MediaWiki\Extension\MediaModeration\Services\MediaModerationDatabaseLookup->fileExistsInScanTable(LocalFile) #8 [internal function]: MediaWiki\Extension\MediaModeration\Hooks\Handlers\UploadCompleteHandler->MediaWiki\Extension\MediaModeration\Hooks\Handlers\{closure}() #9 /srv/mediawiki/php-1.43.0-wmf.7/includes/deferred/MWCallableUpdate.php(42): call_user_func(Closure) #10 /srv/mediawiki/php-1.43.0-wmf.7/includes/deferred/DeferredUpdates.php(486): MediaWiki\Deferred\MWCallableUpdate->doUpdate() #11 /srv/mediawiki/php-1.43.0-wmf.7/includes/deferred/DeferredUpdates.php(198): MediaWiki\Deferred\DeferredUpdates::attemptUpdate(MediaWiki\Deferred\MWCallableUpdate) #12 /srv/mediawiki/php-1.43.0-wmf.7/includes/deferred/DeferredUpdates.php(285): MediaWiki\Deferred\DeferredUpdates::run(MediaWiki\Deferred\MWCallableUpdate) #13 /srv/mediawiki/php-1.43.0-wmf.7/includes/deferred/DeferredUpdatesScope.php(269): MediaWiki\Deferred\DeferredUpdates::MediaWiki\Deferred\{closure}(MediaWiki\Deferred\MWCallableUpdate, integer) #14 /srv/mediawiki/php-1.43.0-wmf.7/includes/deferred/DeferredUpdatesScope.php(198): MediaWiki\Deferred\DeferredUpdatesScope->processStageQueue(integer, integer, Closure) #15 /srv/mediawiki/php-1.43.0-wmf.7/includes/deferred/DeferredUpdates.php(304): MediaWiki\Deferred\DeferredUpdatesScope->processUpdates(integer, Closure) #16 /srv/mediawiki/php-1.43.0-wmf.7/includes/MediaWikiEntryPoint.php(673): MediaWiki\Deferred\DeferredUpdates::doUpdates() #17 /srv/mediawiki/php-1.43.0-wmf.7/includes/MediaWikiEntryPoint.php(496): MediaWiki\MediaWikiEntryPoint->restInPeace() #18 /srv/mediawiki/php-1.43.0-wmf.7/includes/MediaWikiEntryPoint.php(454): MediaWiki\MediaWikiEntryPoint->doPostOutputShutdown() #19 /srv/mediawiki/php-1.43.0-wmf.7/includes/MediaWikiEntryPoint.php(209): MediaWiki\MediaWikiEntryPoint->postOutputShutdown() #20 /srv/mediawiki/php-1.43.0-wmf.7/index.php(58): MediaWiki\MediaWikiEntryPoint->run() #21 /srv/mediawiki/w/index.php(3): require(string) #22 {main}