“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 2. This means that the server is under maintenance mode or just busy.
This tutorial will guide you on how to debug this error.
Contents
What Triggers This Error in 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 var/.maintenance.flag
file
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”.
Armed with the solutions outlined in this guide, you’re well-equipped to tackle this common issue head-on, ensuring minimal disruption to your online store.
Don’t let temporary setbacks deter you; with the right approach, your Magento 2 site will be back up and running smoothly in no time.