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 Add Tooltip in Checkout Shipping Field in Magento 2?

Hello Magento Friends, In today’s blog, I will explain How to Add Tooltip in Checkout…

2 days ago

How to Integrate and Use MongoDB with Laravel?

MongoDB is a popular NoSQL database that offers flexibility and scalability when handling modern web…

4 days ago

NodeJS | Callback Function

In NodeJS, callbacks empower developers to execute asynchronous operations like reading files, handling requests, and…

4 days ago

How to Show SKU in Order Summary in Magento 2?

Hello Magento Friends, In today’s blog, we will learn How to Show SKU in Order…

6 days ago

Best Colors to Use for CTA Buttons

The "Buy Now" and "Add to Cart" buttons serve as the primary call-to-action (CTA) elements…

1 week ago

Magento 2: How to Save Custom Field Value to quote_address for Multi-Shipping Orders

Hello Magento Friends, In Magento 2, the checkout process allows customers to choose multiple shipping…

1 week ago