How to Solve Magento 2 Service Temporarily Unavailable (503)
The error 503 in Magento 2 means that the server is not available at the instant. It may happen because the server is under the maintenance mode or is simply busy.
The Magento 2 store owners may face the Magento 2 Service Temporarily Unavailable error during the installation of a store or server:
“Service Temporarily Unavailable The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.”
The store won’t be available at all when there is an error 503 in Magento 2.
Why Magento 2 Service Temporarily Unavailable Error Occurs
During the Magento 2 installation, the maintenance.flag
file shows the system message until the operation is finished performing. It hides the screen from the users in case of any errors or issues while the process is going on. Technically, this system message should be removed once the operation gets completed. But sometimes, maintenance.flag
file is not deleted automatically after the operation completion and thus, shows the Service Temporary Unavailable error in Magento 2 even after the process is completed.
How to Fix the Magento 2 Service Temporarily Unavailable Error
In order to fix the “503 service temporarily unavailable” error in Magento 2, follow these steps:
- Go to Magento root folder and delete the var/maintenance.flag file.
- Flush Magento 2 cache from the admin panel or by running the following command:
php bin/magento cache:flush
- In case you face any error like “Please Upgrade your database”, run the following command:
php bin/magento setup:upgrade
maintenance.flag
file is present directly in the root directory.That’s so easy, right?
Get rid of 503 error and solve the Magento 2 Service Temporarily Unavailable issue easily!
In case you still need any help to fix the 503 error in Magento 2, feel free to comment. I’d be happy to help.
Thank You!
Sanjay Jethva
Sanjay is the co-founder and CTO of Meetanshi with hands-on expertise with Magento since 2011. He specializes in complex development, integrations, extensions, and customizations. Sanjay is one the top 50 contributor to the Magento community and is recognized by Adobe.
His passion for Magento 2 and Shopify solutions has made him a trusted source for businesses seeking to optimize their online stores. He loves sharing technical solutions related to Magento 2 & Shopify.
36 Comments
i am trying localhost/magento246/pub
i am getting the following error:
after deleting the file .maintenance.flag
This page isn’t workinglocalhost redirected you too many times.
Try clearing your cookies.
ERR_TOO_MANY_REDIRECTS
how can i solved?
i am using magento for student of BCA and BSCIT as teaching purpose
then which version is suitable for student teaching purpose?
Hey Krishna,
Please check the error log of your server,
Use Latest Magento 2.4.6-p2 version.
when I am going to login in magento 1.9 admin panel then error showing
Service Unavailable
The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.
Additionally, a 503 Service Unavailable error was encountered while trying to use an ErrorDocument to handle the request.
Hello Sunny,
Yes, you can use the above solution for the same issue.
Thank You
Hi, I am using Magento 2.4.3. I searched for maintenance.flag but it is not available in any directory.
Hello Shubham,
You need to check debug log to check the issue
Thank You
Hi,
I do not have this log in/var. What else can I check?
Hello Nicole,
Please check the error log of your server.
Thanks
Excellent!
Thank you for this post. What if I’m the only one who gets the 503 error? The rest of my team can pull up the website, and I can on my other computer, but using my main work computer I get the 503 page.
Hello David,
Please check the site in developer mode.
Also try the commands: setup-upgdare,caching and check the log
The solution in the above post works well for me.
Thank you.
Not Found
The requested URL was not found on this server.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
\
Hello,
The above post gives the solution for URL request 503.
For your issue, please contact your server company.
Thank you.
Thanks,
This was really helpful. Solved the issue immediately.
Keep up the good work.
S
Thank you for your appreciation.
I’m glad it helped!
Thanks you’re a life saver
It has been useful multiple times of my career. Thanks
Thought I would have to have our hosting service roll our server back to fix Error 503. A google search brought be hear an di had it fixed in 5 min. In all seriousness, where is the donate button lol?
Hello Steve,
I’m glad that you got a quick solution from my post.
Do subscribe for such amazing posts and keep sharing them.
Thank you!
Service items unavailable due to downtime or capacity problems.been like this on site since yesterday is this normal
I was wondering would the site put this up if thay had closed down
Hello,
Can you please check Php error.log file in you server?
The blog solution will help you in the process.
Thank you.
Thanks Dear,
Got stuck while taking the backup. Your tip saved my day.
Hey! Thanks for your appreciation 🙂
Ita working for me Many thanks
That’s great, do share it with your other Magento peeps to help them as well 🙂
Hai,
I tried remove lot of times. But, this error Frequently showing. it’s not good for my site.. can you assist me with this ??
Hello,
Can you please check the log file?
Also check the server error.log, magento system.log, and exception.log
Thanks.
I tried a lot of methods and still get this error
You may be getting the error due to some custom extension installed in your Magento 2 store.
How can I do php bin/magento cache:flush? how do I enter in the command line?
You need to run this command after login into SSH.
I get an error 503 Service unavailable when saving a product in the admin backend. I tried every troubleshooting available from Magento and Google, nothing worked. I get no log entry in ANY log file (not even php error log or apache error log). Permissions are all correct. Any idea about that? :-/
You need to check further into the 3rd party extensions you are using if they are causing the issue. Try disabling the extension one by one to debug.
The error still apears. magento cashe is cleared the sessions cashe also.
This is most likely a file permission issue. Please look into it.