Magento and classic servers1 min readUpdated

How to Troubleshoot a 502 Bad Gateway Error

A 502 Bad Gateway error usually means your server is temporarily overwhelmed or unable to process the request. This can happen for a few common reasons:

  • Your server hit a resource limit (CPU, memory, PHP processes)

  • A DDoS attack or unusual traffic spike

  • A poorly coded script or plugin causing server overload

  • An issue with PHP-FPM or other backend services

Don't worry — here’s how to fix it:


1️⃣ Wait for Auto-Heal

Our system includes an auto-heal process that runs every 5 minutes. Often, it fixes minor resource hiccups automatically. Give it a few minutes before moving on.

 


2️⃣ Use the Server Overview Button

Head to your Server Overview page and click the dedicated "Fix 502 Error" button.

How to Troubleshoot a 502 Bad Gateway Error

 


3️⃣ Manually Adjust PHP Settings

If the issue persists, log in to Virtualmin and follow these steps:

  • Go to your server ACCESS sectionHow to Troubleshoot a 502 Bad Gateway Error

  • Login to your virtualmin private areaHow to Troubleshoot a 502 Bad Gateway Error

  • Bypass the security warning, allow it

  • Go to your PHP optionsHow to Troubleshoot a 502 Bad Gateway Error

  • Find the PHP-FPM children value

  • Change it slightly (e.g., from 19 to 20 or 20 to 19)How to Troubleshoot a 502 Bad Gateway Error
    This action will restart the PHP faulty service.

 


4️⃣ Still Stuck? Open a Support Ticket

If nothing works, our team is here to help. Open a support ticket at: My Tickets

 


✅ Always Check Your Store After Each Step

After trying any of the above steps, reload your store’s frontend to see if the issue is resolved.

Did this solve it? If not, tell us what you see and we look at your server.

Open a ticket

Still stuck? Ask a person.

Tickets go straight to the engineers who run ShopWhizzy servers. Tell us the store, what you see and when it started, and we take it from there.