We are experiencing occasional HTTP “520” errors when loading resources from our web-based application. If I refresh the app 50 times it might happen once.
I have reviewed Cloudflare docs and many community topics to find a solution. But so far, I haven’t been able to fix things. I spoke with our hosting company and they also weren’t able to identify any issues on their end. No errors show up in any Apache logs. I do see the successful entries in the Apache log showing HTTP 200 status. But when a file fails to load, there is no record of it in the Apache access log or error log.
Our web application consists of typical web files, like HTML, CSS, and JS. But it also loads (via JavaScript) a couple dozen JSON files that contain data. The overwhelming majority of the time, all files load fine. But occasionally one of these JSON fails to load and DevTools shows the HTTP 520 error. Whenever these data files fail to load, our application breaks (since it needs the data), so it is easy to see when something has gone wrong (as opposed to say a CSS file where you might not notice it failed to load). So, I can’t say for sure that the only files to ever fail are the JSON files. They just happen to be the most easily noticed.
Our server is a typical LAMP setup and there is not server-side PHP involved. It’s just Apache accessing files.
Does anyone have any suggestions or things we could change that might help? I’m running out of ideas.
Thanks!