How to Solve Magento 2 Service Temporarily Unavailable Error(503)?

Today, we’re going to teach you guys how to solve Magento 2 Service Temporarily Unavailable Error 503.

The Error 503 simply indicates that the server is not available at this instant.

Now, this can occur due to either maintenance mode or the server is actually busy.

However, Magento 2 store owners can also face the Magento 2 Service Temporarily Unavailable Error 503 during the store or server installation process.

And if there is an error 503, your store won’t be available to access at all.

Why Service Temporarily Unavailable Error Occurs During Installation?

When you’re installing Magento 2, it automatically creates maintenance.flag file for displaying the system message until Magento 2 is completely installed.

And once the installation is completed, the maintenance.flag file gets automatically deleted. But many times, the maintenance.flag file is not deleted automatically after the installation process and it then causes the Service Temporarily Unavailable Error 503.

How to Solve Service Temporarily Unavailable Error 503 in Magento 2?

Step 1. First of all, navigate to Magento 2 root folder > var and delete the maintenance.flag file.

Step 2. After that, refresh the Magento 2 cache from the admin panel or php bin / magento cache:flush.

Step 3. Now, try accessing your Magento 2 website. If it is accessible then good. If you get an error message like “Please Upgrade your database”, then simply execute the php bin / magento setup:upgrade command from the root folder.

Final Note

And that’s about it!

This is how easy it is to solve Service Temporarily Unavailable Error 503 in Magento 2.

And if you need our professional assistance, feel free to contact us anytime.

Recommended: How to Fix Cron Job Error While Magento 2 Upgrade?