Server 2012 “Automatic Maintenance” Killed our SAN

We have had performance issues for a few weeks at night, all our Hyper-V Servers where performing like CRAP every night around 3 AM and for about 45 minutes.

After a long night of investigation with my colleague, we found out that Windows 2012 is running a maintenance job around 03:00 each day.

The Automatic Maintenance window in the Action Center
The Automatic Maintenance window in the Action Center

When we stopped it all began to run as normal. This caused overloading of the SAN SP and gave high disk queue on all servers attached to the SAN.

But, after we disabled the Scheduled Task “Regular Maintenance“, it got enabled Again after some hours.

To avoy this disable “Maintenance Configurator“, but this can´t be done from GUI

To disable Maintenance Configurator run this command on a server with PsExec Link :

psexec \\SERVERNAME -s schtasks /change /tn "\Microsoft\Windows\TaskScheduler\Maintenance Configurator" /DISABLE
Maintenance is now disabled.
Maintenance is now disabled.
VN:F [1.9.22_1171]
Rating: 5.9/6 (8 votes cast)
Server 2012 "Automatic Maintenance" Killed our SAN, 5.9 out of 6 based on 8 ratings

18 thoughts on “Server 2012 “Automatic Maintenance” Killed our SAN”

    1. Hi Yossi,

      That`s not correct, if you got the task “Maintenance Configurator” disabled it will NOT re-enable after a reboot.

      I just tested it on one of our servers.

      VN:F [1.9.22_1171]
      Rating: 0.0/5 (0 votes cast)
    2. Hey guys,

      If you have a WSUS server, this can be done through group policy.

      Under Configure Automatic Updates, there’s a checkbox called “Install during automatic maintenance”. REMOVE THE CHECKBOX!

      VA:F [1.9.22_1171]
      Rating: 0.0/5 (0 votes cast)
  1. Do you know how to disable the maintenance on a 2012 Core install?

    VA:F [1.9.22_1171]
    Rating: 0.0/5 (0 votes cast)
    1. Hi Sam,

      I´m not sure, but the easiest will be to install psexec on another server and run the command from there.

      VN:F [1.9.22_1171]
      Rating: 0.0/5 (0 votes cast)
      1. Thanks Lars, In fact psexec is the only way it will work. When I tried to do it without I kept getting “access denied”. It only works using the psexec program.

        VA:F [1.9.22_1171]
        Rating: 0.0/5 (0 votes cast)
        1. If you run the command directly on the server without PsExec you will get “access denied”. Run it on the Core server without the \\SERVERNAME part of the script, then it will run it on the local machine with the system account 🙂

          VN:F [1.9.22_1171]
          Rating: 0.0/5 (0 votes cast)
  2. OK, I did this. Successfully disabled Maintenance Configurator.
    …BUT … could not connect to the internet anymore. Windows said connection OK, could see shares on other PCs on my LAN, but both Firefox and IE would not load web pages.

    Internet connection is of type:
    ControlPanel->System->.. Workgroup=
    ControlPanel->Network and Sharing->Ethernet ->… Private (current profile)

    I tried ENABLING the Maintenance Configurator, no joy.
    I restored the disc image I made (with Macrium) just before this, and everything OK again.

    Any ideas?

    VA:F [1.9.22_1171]
    Rating: 0.0/5 (0 votes cast)
    1. Hi Alex,

      Thats sounds strange, i have done this on 5+ servers without any problems.

      VN:F [1.9.22_1171]
      Rating: 0.0/5 (0 votes cast)
  3. Hi Lars Jørgensen

    I’ve try to disable Maintenance Configurator on my server, but it did not work.

    it says “PsExec could not start schtask on …” my server”.

    VA:F [1.9.22_1171]
    Rating: 0.0/5 (0 votes cast)
  4. try this update

    http://support2.microsoft.com/kb/2975719

    works for our case, in our enviroment Automatic Maintenance consume all the ram 40 GB and then create a large page file while defrag all 8 drives on our file server cluster, this cause a time out on cluster health check and failover resources to other node.after install this update problem resolved.

    hope this will help

    VA:F [1.9.22_1171]
    Rating: 0.0/5 (0 votes cast)
  5. hi, Lars Jorgensen
    Why not use GPO with a starting at 3000 years ?
    Go to Computer Configuration->Policies->Administrative Template->Windows Components->Maintenance Scheduler–> And change this option: Automatic Maintenance Activation Boundary. Enable it and change the year from 2000 to 3000
    hope this will help

    VA:F [1.9.22_1171]
    Rating: 0.0/5 (0 votes cast)
    1. Hi Ludovic,

      Thanks, i will test that 🙂

      VN:F [1.9.22_1171]
      Rating: 0.0/5 (0 votes cast)
  6. I tried doing it as described, cut and paste. I’m running it from the server in questions. Initially I tried it with with server name intact. It kept saying it couldn’t find the file, but it wouldn’t specify which file.

    Then, realizing I don’t need the server name when running it locally, I removed that, and now it says:
    Error establishing communication with PsExec service on “my server”:
    The system cannot find the file specified.

    I’m obviously doing something wrong, but I’m not clear what.

    VA:F [1.9.22_1171]
    Rating: 0.0/5 (0 votes cast)
    1. Did you add psexec to c:/windows/system32?

      VN:F [1.9.22_1171]
      Rating: 0.0/5 (0 votes cast)
  7. Hi All,

    What does this maintenance job actually do in the background? It’s one thing disabling it but what processes and procedures is it running? Completely switching off a scheduled task seems like a heavy handed approach to an issue but if it works! More curious to see if you had to readdress this in another way or did the hosts degrade in performance over time?

    Thanks

    VA:F [1.9.22_1171]
    Rating: 0.0/5 (0 votes cast)

Leave a Reply

Your email address will not be published. Required fields are marked *