4

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?

7ochem
  • 7,532
  • 14
  • 51
  • 80
GisMofx
  • 141
  • 1
  • 4
  • 2
    check if you have installed any schedule maintenance extension – Pankaj Pareek Sep 11 '15 at 04:37
  • @GisMofx Have you installed any extension recently in to your site? – Mukesh Sep 11 '15 at 09:04
  • @Muk nothing changed on my site from when it was stable to this state. This is why it's so baffling to me –  Sep 11 '15 at 12:22
  • @PankajPareek I don't have any maintenance extensions –  Sep 11 '15 at 12:23
  • @GisMofx Do you see any errors in var/system.log and var/exception.log files? – Mukesh Sep 11 '15 at 12:25
  • if you are not able to identify how flag file create everytime on your server. you can comment this code on index.php to stop site to go on maintenance mode: if (file_exists($maintenanceFile)) { include_once dirname(FILE) . '/errors/503.php'; exit; } – Pankaj Pareek Sep 11 '15 at 12:37
  • 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

4 Answers4

1

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.

Amrit Pal Singh
  • 1,616
  • 1
  • 15
  • 35
riker09
  • 11
  • 1
1

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.

Steven J
  • 808
  • 9
  • 21
0

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.

Mohit Kumar Arora
  • 9,951
  • 7
  • 27
  • 55
Amit Bera
  • 77,456
  • 20
  • 123
  • 237
  • 1
    This answer is barely legible. I might suggest you spend more time writing good quality answers than adding random formatting. – scrowler 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
-1

Try this one !

php bin/magento maintenance:disable
Verdu
  • 1,730
  • 1
  • 17
  • 31