It seems that sometimes wfGetDB() can throw in a way that doesn't recover by itself.
Request ID: XH6GfwpAMFYAAKFRdRcAAADD
Request URL: /w/load.php?debug=false&lang=zh-hans&modules=...
Log time: 2019-03-05T14:24:08
Wikimedia\Rdbms\DBConnectionError: Cannot access the database: No working replica DB server: Unknown error (10.64.16.191)
Stack trace:
#0 /srv/mediawiki/php-1.33.0-wmf.19/includes/libs/rdbms/loadbalancer/LoadBalancer.php(742): Wikimedia\Rdbms\LoadBalancer->reportConnectionError()
#1 /srv/mediawiki/php-1.33.0-wmf.19/includes/GlobalFunctions.php(2654): Wikimedia\Rdbms\LoadBalancer->getConnection()
#2 /srv/mediawiki/php-1.33.0-wmf.19/includes/resourceloader/ResourceLoader.php(120): wfGetDB()
#3 /srv/mediawiki/php-1.33.0-wmf.19/includes/resourceloader/ResourceLoader.php(747): ResourceLoader->preloadModuleInfo()
#4 /srv/mediawiki/php-1.33.0-wmf.19/load.php(46): ResourceLoader->respond()
#5 /srv/mediawiki/w/load.php(3): include()
#6 {main}Error is thrown from LoadBalancer.php:740.
Impact
The given instance here is from load.php, which does actually catch and recover from error because (unlike most MW code) RL doesn't actually hard-depend on being able to use the database. (It then logs the above as level=WARNING for informational purposes.)
But RL's handling for this is unique to it, and outside the wfGetDB code path. Until proven otherwise I'm going to assume this is affecting all of MediaWiki and not just RL. And for MW requests, this would be fatal. But, until I find a sample of that, not tagging as Wikimedia-production-error yet.