Website is down
502 and 504 errors on your website
The web server accepted the request but didn’t get a response from PHP in time. A restart helps for a while, then the error returns. I find exactly what is slow or crashing and remove the cause.
SSH is best. Without it — the hosting panel with logs and load graphs.
This is for you if
“502 Bad Gateway” from nginx
Usually PHP-FPM crashed or isn’t running.
“504 Gateway Timeout”
PHP is running but can’t answer in time: a heavy page or database query.
Errors at peak hours or during ad campaigns
The server runs out of processes, memory or CPU.
It fails on specific actions
Product import, a report, checkout, search.
What is included
Logs and load
nginx and PHP-FPM logs, memory, CPU, slow queries.
PHP-FPM tuning
Number of processes, time and memory limits for your server.
Slow parts of the site
Heavy database queries, plugins, external services that delay the response.
Long operations
Imports, exports and reports moved to the background so there are no 504s.
Testing under load
I make sure the error doesn’t appear with normal traffic.
How I work
- Tell me when the error appears — All the time, in the evenings or on certain pages.
- I check logs and graphs — To see exactly what hits the limit.
- We agree — Sometimes tuning is enough, sometimes you need a bigger plan — I’ll tell you honestly.
- I fix and watch — I check the result with the monitor for a day.
Price
Usually 1–3 hours. If the real fix is serious site optimisation or moving to a more powerful server, those are separate fixed-price services.
Not included: paying for a bigger hosting plan, full website speed optimisation.
Can I fix it myself?
On shared hosting, look at the load graphs and limits in your panel: if you’re hitting them, the host itself throttles the site. If the error only appears with Cloudflare, check whether the site works directly.
Questions and answers
Restarting the server helped. Is that enough?
That’s first aid. If the cause isn’t found, the error comes back — usually at the worst moment.
Do I need to move to a VPS?
Not always. Tuning PHP and caching is often enough. If the hosting really is too small for the site, I’ll suggest options.
What’s the difference between 502 and 504?
502 — PHP didn’t answer at all (crashed, not running); 504 — it answered too late. They’re fixed differently.
More in «Website is down»
Contact
Let’s discuss your website
Message me in any messenger about the project and what you need — I’ll reply within a business day. The initial audit and estimate are free.