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.

3️⃣ Manually Adjust PHP Settings
If the issue persists, log in to Virtualmin and follow these steps:
-
Go to your server ACCESS section

-
Login to your virtualmin private area

-
Bypass the security warning, allow it
-
Go to your PHP options

-
Find the
PHP-FPM childrenvalue -
Change it slightly (e.g., from 19 to 20 or 20 to 19)

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.