[FIXED]: Magento 503 Service Temporarily Unavailable?

[FIXED]: Magento 503 Service Temporarily Unavailable?
The 503 error is a well-known server error that is synonymous with service unavailability. It means that the server is not ready to handle the request for the time being. The user is not able to use the service at all and gets the following error message:

Service Temporarily Unavailable

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

magento 2 service temporarily unavailable error 503

Possible Causes of the 503 Service Temporarily Unavailable Error

As stated above, the 503 is a server error meaning that the error is from the server side. Something is wrong with the server that is preventing you from getting access to it. It may occur in one of the following cases.
  • If the server is overloaded
  • If the server is busy
  • If the server is down for maintenance
This is however a temporary error and may restore once the server is available sometimes by just reloading the page.

What Causes the 503 Service Temporarily Unavailable Error in Magento 2?

During Magento 2 installation, a .maintenance.flag file is created to display a system message and inform users that the system is under maintenance. It helps to hide any issues that occur during installation. Usually this file is automatically removed after successful installation. But sometimes it stays or is created again and thus gives rise to the error even when Magento 2 has been successfully installed.

How to Fix Service Temporarily Unavailable Error in Magento 2?

The .maintenance.flag file is mainly responsible for the error. So to fix the error, you have to get rid of this file. Note that this maintenance file is different in Magento 1.x and Magento 2.x. In Magento 1.x, it is maintenance.flag in Magento root folder. In Magento 2.x, it is .maintenance.flag in Magento root folder/var. To disable the maintenance mode, do the following.
  • Go to the Magento root folder and delete the var/.maintenance.flag file
  • 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.”
  • Run php bin/magento setup:upgrade from the root directory if you see the error “Please Upgrade your database.”
This is the simplest solution to fix the Error 503: Magento 2 service temporarily unavailable. If you have any questions or if the error persists for you, don’t hesitate to contact our support team. Related Articles: