Slow Google Maps and Error 522 when cache is on

I noticed recently that our site is extremely slow on pages that have Google Maps included (for example the home page itself) and it also gives 522 errors sometimes on other pages.

I tried turning off plugins, purging cache but nothing helped. But when I turn off cache by turning on “Development Mode” everything works fine. Also, when I set the real IP of the server in my hosts file on my computer (so basically I bypass Cloudflare) it seems to work well too.

I attached an image about the issue and Pingdom sees it slow as well:

Can someone give me an advice on how to deal with this problem?

The site is:

I’m thinking the slow Google Maps is because the page is waiting for some resources to load, but they’re getting a timeout (522). And once that’s done waiting/gives up, page rendering moves on to the Google Map.

As for why Dev Mode fixes this, that’s a mystery. That typically increases the load on the server and greater chances for getting a 522. You’d have to track down the 522 problem and I bet that will fix the Maps problem.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.