General

Solved: Magento 2 Service Temporarily Unavailable (Error 503)

Hello Magento Folks,

Last time we learned about Order state and order status and how they are different from each other? Today, I am here to explain to you how to solve error 503 – service temporarily unavailable for Magento 2 stores.

If you or your visitors are getting error 503 – service temporarily unavailable, it means that there is something wrong with your site. In other words, it means that the server is not available to fulfill the request at the moment due to it may not be responding, it may be busy, or it may be in the maintenance mode. You will likely get the below message.

You may get this kind of error when you have installed an extension or upgraded your Magento 2 version to the latest version. Whenever this message appears, you or your visitors will not be able to access the site.

Few errors can be seen during the installation of store or server

– Services temporarily unavailable

– The server is temporarily unable to handle the request.

– The server is temporarily unavailable due to capacity problems or maintenance downtime; please try again later.

Let’s look at the reasons for error 503 – Service Temporarily Unavailable for Magneto 2,

During the installation of Magento 2, the system creates the file .maintenance.flag  to show the system is under maintenance mode. This can be helpful to hide any issues or problems that occur during the installation or upgrade of your visitors.

The file is automatically removed after the overall processing is complete. But sometimes it may not be automatically removed or deleted, or the file may be created again in the system. Therefore, the existence of .maintenance.flag file in Magento 2 system will display error 503 – Service Temporarily Unavailable.

Let’s look at how to fix this error in Magento 2?

In Magento 2 root folder of var, navigate and find the file named .maintenance.flag. Delete this file. The file should have been deleted after update or installation is over, but due to some reason, it may be created again in the system.

Disabling the maintenance mode:

  • First of all, go to the Magento root folder and delete the file var/.maintenance.flag.
  • Then refresh magento 2 cache from php bin/magento cache: flush or via the admin panel.
  • Check the error log if the message is saying “Exception printing is disabled by default for security reasons.”
  • Run php bin/Magento setup: upgrade from the root directory, in case of an error says “Please Upgrade your database.”

So this was it for the day. Once you complete the above steps, you will be free from error 503 – Service temporarily Unavailable. If you face any issues while doing so, then contact our support team for help.

One important note:

The maintenance mode file in Magento 2 differs from Magento 1 in a leading dot, compare: .maintenance. Flag and maintenance. Flag!

Happy Reading?

Click to rate this post!
[Total: 7 Average: 5]
Gaurav Jain

Gaurav Jain is Co-Founder and Adobe Certified Expert-Magento Commerce Business Practitioner. Being Computer Engineer👨‍💻 and possessing Extensive Marketing skills he handles all kinds of customer Queries and his Happy😀 & Helping🙏 Nature makes customer's day Delightful. When he isn’t working, you’ll find Gaurav Reading on Books📖 or Traveling🚗. Also, he is Speaker at Magento Meetups.

View Comments

  • Thank you for the article. Over the past 3 months, the 503 error has been on my site 5 times. Now I think that I need to change hosting in order to avoid problems in the future.

Recent Posts

How to Integrate ChatGPT with Laravel Application?

In this guide, we'll explore how to integrate ChatGPT, an AI-powered chatbot, with a Laravel…

3 days ago

What are Net Sales? How to Calculate Your Net Sales?

In the world of business, understanding financial metrics is crucial for making informed decisions and…

5 days ago

Magento 2 Extensions Digest April 2024 (New Release & Updates)

Welcome to the MageComp Monthly Digest, where we bring you the latest updates, releases, and…

5 days ago

The ABCs of Geofencing: Definition, Features and Uses

In this era, businesses are always on the lookout for ways to engage with their…

6 days ago

How to Delete Product Variant in a Shopify Remix App using GraphQL Mutations?

Managing a Shopify store efficiently involves keeping your product catalog organized. This includes removing outdated…

7 days ago

6 Innovative Tools Revolutionizing E-Commerce Operations

E-commerce has transformed the way consumers shop for products and services and interact with businesses.…

1 week ago