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

  1. Tell me when the error appears — All the time, in the evenings or on certain pages.
  2. I check logs and graphs — To see exactly what hits the limit.
  3. We agree — Sometimes tuning is enough, sometimes you need a bigger plan — I’ll tell you honestly.
  4. 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»

Website is down Your site won’t open, shows an error, or loads forever and fails? I’ll find the cause — domain, DNS, hosting, SSL or the site itself — and … 500 error on your website Getting 500 Internal Server Error? I’ll find the cause in the logs — a plugin, PHP, .htaccess, permissions or memory — and fix it. WordPres… White screen instead of your website A blank white page instead of your site or admin? It’s a PHP error the server is hiding. I’ll enable logging, find the culprit — a plugin, … Database connection error “Error establishing a database connection” on your site? I’ll check MySQL, credentials, disk space and damaged tables and bring the site ba… Website broke after an update After updating WordPress, Joomla, MODX, a plugin or PHP your site shows an error, the layout broke or the cart stopped working? I’ll get it… Can’t log in to the admin Forgot the admin password, the login keeps bouncing you back, your user disappeared or the admin shows a white screen? I’ll restore access … 503 Service Unavailable error Your site returns 503 Service Unavailable? I’ll find out what refuses to serve it — hosting limits, PHP, bot protection or the CMS maintena… 403 Forbidden: access denied Your site or admin returns 403 Forbidden? I’ll find what’s blocking it — file permissions, .htaccess, hosting protection or a security plug… “Too many redirects” error The browser says “redirected you too many times” or ERR_TOO_MANY_REDIRECTS? I’ll find where redirects go round in circles — HTTPS, www, Clo…

All services →

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.