Getting 502/503 Errors on Your VPS? Here’s Why

This page contains affiliate links. If you make a purchase through one, we may earn a commission at no extra cost to you.

A 502 or 503 error means your web server couldn’t handle the request — 502 usually means something behind the scenes crashed or gave a bad response, 503 usually means the server is temporarily overloaded or down. On a budget VPS specifically, both are frequently tied to running out of resources, not a mysterious software bug.

See Contabo’s VPS plans

Why This Happens More on Budget VPS Plans

Budget VPS pricing works by allocating shared CPU resources more aggressively than premium providers — that’s the actual mechanism behind the lower price, covered in more depth in our Contabo review. Under normal load this is invisible. Under a traffic spike or a CPU-heavy task, it’s exactly when a 502 or 503 is most likely to show up, since the server runs out of headroom faster than a dedicated-resource plan would.

Check Server Load First

Log in and check current CPU and RAM usage. If either is maxed out, that’s very likely the actual cause — something is consuming more resources than the plan has available, whether that’s a traffic spike, a runaway process, or a script stuck in a loop. Restarting the specific service that crashed (commonly PHP-FPM or the web server itself) often clears the immediate error, but it will come back if the underlying resource crunch isn’t addressed.

Terminal window showing scrolling server error logs

Check the Actual Error Logs

Guessing wastes time. Your web server’s error log (commonly found in a location like /var/log/nginx/error.log or /var/log/apache2/error.log depending on what’s installed) will usually name the specific service that failed, which turns a vague “site is down” into a specific, fixable problem.

Check for a Recent Deployment or Update

If the error started right after a plugin update, a theme change, or a manual server change (a new package installed, a config file edited), that timing is the fastest lead you have, more useful than staring at load metrics that look normal. Check your host’s or CMS’s activity log for what changed in the hours before the first error, and if something lines up, rolling that specific change back is usually faster than working through the resource-usage checklist from scratch. This is worth checking before the log-diving step below if you know something changed recently, since it turns an open-ended investigation into a specific rollback. A Contabo VPS gives you full root access to check exactly this, rather than being limited to whatever a managed host’s support dashboard happens to expose.

A Bad Plugin or Script Is a Common Non-Resource Cause

Not every 502/503 is a resource problem. Poorly-written plugin code, an unoptimized database query, or a misconfigured reverse proxy can trigger the same errors even on a server with plenty of headroom. If server load looks normal when the error happens, a recently installed or updated plugin is the next place to check — disable it temporarily and see if the error stops.

Person troubleshooting a server issue at a home office desk

When It Means You’ve Actually Outgrown the Plan

If server load is consistently near the limit even during normal, non-spike traffic, that’s a real signal the current plan’s resources are genuinely undersized for what you’re running, not a one-time fluke. Upgrading to a higher-tier plan with more CPU and RAM is the actual fix at that point, not more troubleshooting.

Preventing It Before It Happens Again

Basic server monitoring (even a simple free tool that alerts you when CPU or RAM usage crosses a threshold) catches a resource problem before it becomes a live outage. Caching — a page cache for a CMS, or an object cache for a database-heavy site — reduces the load a normal visit puts on the server in the first place, which raises the traffic level it takes to trigger the same error. If monitoring shows the current plan is consistently near its ceiling rather than just spiking occasionally, comparing Contabo’s higher-tier VPS plans is worth doing before the next outage forces the decision.

Frequently Asked Questions

Is a 502/503 error the host’s fault or my fault?

On a self-managed VPS, it’s almost always something on your side — server configuration, resource limits, or a plugin — since you’re the one managing the server. This is different from shared or managed hosting, where the host handles server-level configuration for you.

Can I fix this without knowing Linux well?

More realistically than a few years ago — an AI assistant can walk you through reading the error log and restarting the right service step by step, even if you’ve never done server troubleshooting before. See our piece on why you don’t need premium support anymore.

Does upgrading my VPS plan guarantee this won’t happen again?

It fixes a resource-related cause, but not a bad plugin or misconfiguration — those will still cause the same error on a bigger plan. Check the actual cause before assuming an upgrade is the fix.