The error 503 in Magento 2 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 a 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 in Magento 2.
Why Magento 2 Service Temporarily Unavailable Error Occurs
During the Magento 2 installation, the maintenance.flag
file shows the system message until the operation is finished performing. It hides 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 in Magento 2 even after the process is completed.
How to Fix the Magento 2 Service Temporarily Unavailable Error
In order to fix the “503 service temporarily unavailable” error in Magento 2, follow these steps:
- Go to Magento root folder and delete the var/maintenance.flag file.
- Flush Magento 2 cache from the admin panel or by running the following command:
php bin/magento cache:flush
- In case you face any error like “Please Upgrade your database”, run the following command:
php bin/magento setup:upgrade
Note: In Magento 1.x version, the maintenance.flag
file is present directly in the root directory.
That’s so easy, right?
Get rid of 503 error and solve the Magento 2 Service Temporarily Unavailable issue easily!
In case you still need any help to fix the 503 error in Magento 2, feel free to comment. I’d be happy to help.
Thank You!