Hello,
I’ve been using Infinityfree free hosting plan for a while now. I noticed that once a day when I try to enter my wesite, I had a bad gateway error and recently when I went to cloudflare ssl an internal server error. When I refresh the page, I don’t have the problem no more. Is it related to the server being paused down ? And how to correct it ?
It takes around 1 minute to work again, but I noticed that I had this error when nobody enters my website for a little while. And yes it happens once a day generally
Seeing how you’re using WordPress, I think the issue is called by WP-Cron. The first time you visit your website again, WordPress will use the first page request to perform background tasks. Those tasks include checking for plugin and theme updates, but plugins can add their own code as well. This will result in the first page view in a while to take quite a bit longer than subsequent ones.
In your case, it seems to take so long that the server actually gives up waiting for the code to complete, which results in the error.
Fortunately, you can also run the WP-Cron tasks separate from the web requests, like so:
Please try setting the cron job as described and see if this helps.