“Service temporarily unavailable. The server is temporarily unable to service your request. Please try again later” or 503 error is a common error in Magento 1 and 2. This means that the server is under maintenance mode or just busy.
This tutorial will guide you on how to debug this error.
What Triggers The Error On Magento 2
The message indicates that the server is not available at the moment, and it can be seen in several cases, such as:
- When the maintenance mode is enabled
- There are server capacity problems
- There is server misconfiguration
To explain this, during the installation process, the server will create a .
maintenance.flag file. Usually, the file will be removed automatically after the installation finishes. Yet, in the case when something goes wrong and the file is not deleted, Magento will continue to show the “Service Temporarily Unavailable” error to the user.
Note: In Magento 1, the file is named
maintenance.flag in the Magento root folder. But in Magento 2, the file is
.maintenance.flag. and located in Magento root folder/var.
How To Fix Magento 2 “Service Temporarily Unavailable” Error?
You can fix this error by disabling the maintenance mode by following these steps:
Step 1: Navigate to the Magento root folder. Find and delete the
Step 2: Refresh Magento 2 cache:
php bin/magento cache:flush or via the Admin Panel
Step 3: In case a message saying “Exception printing is disabled by default for security reasons” is shown, you need to check the error log.
Step 4: Run
php bin/magento setup:upgrade from the root directory if the error log displays “Please upgrade your database”.
This guide shows you the most straightforward and simple way with only 4 steps to fix the error of “Service Temporarily Unavailable“. Now you can continue working on your Magento configuration without any hindrance.
If you find this tutorial helpful, follow our blog for more tips on Magento 2. And please don’t hesitate to leave a comment below in case you have more questions.