Making a request for http://localhost/api.php?action=visualeditor&format=json&paction=parse&page=Main_Page&uselang=en results in long pauses until Parsoid times out and the request fails.
git bisecting mediawiki core brings me to https://gerrit.wikimedia.org/r/#/c/230967/, which was also the cause of T109183. Reverting that helps.
Setting $wgMessageCacheType = CACHE_NONE; obviously also resolves the issue.
It's getting late so I'm giving on debugging. Let me know if you need any more info to go on.
Possibly related: https://www.mediawiki.org/wiki/Topic:Slfskc3j2n1c22p3