How To Solve “Service Temporarily Unavailable” Error In Magento 2?

service temporarily unavailable error

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.

What Triggers This 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.

503 service unavailable the server is temporarily busy try again later

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.

Here’s How To Fix Magento 2 “Service Temporarily Unavailable” Error

service is temporarily unavailable please try again later

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”.

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 such as How To Fix “One Or More Indexers Are Invalid” Error, How To Fix “Exception Printing Is Disabled By Default For Security Reasons” Error, etc.