Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-3063

When mongod is installed as a Windows service it sometimes gets in an infinite loop of failed starts



    • Type: Improvement
    • Status: Open
    • Priority: Major - P3
    • Resolution: Unresolved
    • Affects Version/s: 1.8.1
    • Fix Version/s: Backlog
    • Component/s: Admin
    • Labels:


      If mongod crashes it leaves behind a mongod.lock file indicating that it did not shut down cleanly. When mongod is installed as a service Windows attempts to start the mongod service automatically when it boots. The presence of the mongod.lock file causes the mongod service to fail to start. Windows detects that as a failure and attempts to start the mongod service again, which then fails again for the same reason. This cycle repeats indefinitely because Windows is configured by default to always restart the mongod service on failure.

      A work around is to manually configure the mongod service to only restart automatically the first or second time. It should be configured to "Take No Action" on "Subsequent Failures". This can be configured by going to the Recovery tab of the Properties dialog of the mongod service.

      This JIRA ticket is to change the implementation of "mongod --install" to automatically configure the mongod service out of the box to only restart automatically on the first (or possibly second) failures. This will prevent the infinite failure loop.




            • Votes:
              1 Vote for this issue
              5 Start watching this issue


              • Created: