Solved: Magento 2 Service Temporarily Unavailable (Error 503)

The error 503 means that the server is not available at the instant. It may happen because the server is under the maintenance mode or is simply busy.

The Magento 2 store owners may face the Magento 2 Service Temporarily Unavailable error during the installation of store or server:

“Service Temporarily Unavailable The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.”

The store won’t be available at all when there is an error 503.

Why Magento 2 Service Temporarily Unavailable error occurs:

While Magento 2 installation, it creates maintenance.flag file to show the system message until the operation is finished performing. It helps to hide the screen from the users in case of any errors or issues while the process is going on. Technically, this system message should be removed once the operation gets completed. But sometimes, maintenance.flag file is not deleted automatically after the operation completion and thus, shows the Service Temporary Unavailable error even after the process is completed.

How to fix the Magento 2 Service Temporarily Unavailable error:

Navigate to Magento 2 root folder and find out the .maintenance. flag file in the var folder. Usually, this file is automatically removed after the installation process.

But due to some error, the deletion of this file is skipped or is created again, causing problems like error 503.

Disabling the maintenance mode:

  • Go to the Magento root folder to delete the file var/.maintenance.flag
  • Refresh Magento 2 cache from php bin/magento cache:flush or via the Admin Panel
  • Check the error log if you see a message saying “Exception printing is disabled by default for security reasons.”
  • In case of an error like “Please Upgrade your database”, run php bin/magento setup:upgrade from the root directory.

Note: The maintenance mode file differs for Magento 1 than Magento 2.

  • Magento 1.x: Delete maintenance.flag file from Magento root folder
  • Magento 2.x: Delete .maintenance.flag file from the folder [Magento root folder]/var

Get rid of the error 503 and fix the Magento 2 Service Temporarily Unavailable easily!

No more errors in your Magento 2 store so that the shoppers can enjoy your services without any hindrance ?

The solution is presented in the most simple way possible, however, if you get stuck anywhere please feel free to ask your doubts in the Comments section below and I’d be happy to help ?

Thank You!

4.9
(based on 31 Reviews)
Solved: Magento 2 Service Temporarily Unavailable (Error 503)Author Magento Badge

Sanjay Jethva

Sanjay is a co-founder at Meetanshi. He is a Certified Magento Developer who loves creating Magento E-commerce solutions. Owing to his contributions in Magento Forums and posting solutions, he is among the top 50 contributors of the Magento community in 2019. When he is not engrossed with anything related to Magento, he loves to play cricket.

32 Comments

Leave a Reply

Your email address will not be published. Required fields are marked *