Seemingly out of nowhere my Magento keeps entering maintenance mode and brings my site offline. It's happened 4 times in the last 3 or so weeks and the only temporary fix thus far is to delete the maintenance.flags file via ftp.

First, what could cause this and how can I go about finding it?

migrated from stackoverflow.com Sep 22 '15 at 11:57

This question came from our site for professional and enthusiast programmers.

  • 2
    check if you have installed any schedule maintenance extension – Pankaj Pareek Sep 11 '15 at 4:37
  • @GisMofx Have you installed any extension recently in to your site? – Mukesh Sep 11 '15 at 9:04
  • @Muk nothing changed on my site from when it was stable to this state. This is why it's so baffling to me – GisMofx Sep 11 '15 at 12:22
  • @PankajPareek I don't have any maintenance extensions – GisMofx Sep 11 '15 at 12:23
  • 3
    Do you have a scheduled backup procedure set up from the backend System->Tools->backup? If you do, and the backup does not finish properly the flag is not removed. – Marius Sep 22 '15 at 12:06

If the file maintenance.flag is created at random times, a user might be the cause. If it is always at the same time, I would bet my money on a module.

When the time at which the site enters the maintenance mode is completely random, I would suggest you check for additional FTP accounts. It might be worth to check the FTP logs of your FTP account as well to see if the file was created via FTP. Change the passwords, if that yields a result.

Also, keep in mind that some hostings offer web-based FTP. Check these accounts as well (if any).

If the maintenance.flag file is created always around the same time, I would think that there might be a module at work, that for whatever the reason might be, thinks it would be a good time to switch the site in maintenance mode.


Check system.log and exception.log content that are placed under var/log folder. You will see what errors are happening in your site.

You can check errors you see there, and you can paste some of them here, or you can search on the google for specific error you see there.


My suggestion is to create staging system for your instance. Enable the Magento Error log printing from backend.

If it creates YourMagentoDir/var/system.log and YourMagentoDir/var/exception.log then there must be some issues in your instance.

Start Debugging the system by following Fundamentals for debugging a Magento store.

If this debug is not given solution then it might be server side issue.

  • This answer is barely legible. I might suggest you spend more time writing good quality answers than adding random formatting. – Robbie Averill May 24 '16 at 21:12
  • You missed a crucial part of the op question '...delete the maintenance.flags file via ftp' which clearly indicates that there is another issue. The site is purposely put into maintenance mode. The answr you provided does not match what is described. – ProxiBlue Feb 11 '17 at 22:42

Try this one !

php bin/magento maintenance:disable

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.