[SERVER-3063] When mongod is installed as a Windows service it sometimes gets in an infinite loop of failed starts Created: 09/May/11  Updated: 06/Feb/23  Resolved: 06/Feb/23

Status: Closed
Project: Core Server
Component/s: Admin
Affects Version/s: 1.8.1
Fix Version/s: None

Type: Improvement Priority: Major - P3
Reporter: Robert Stam Assignee: [DO NOT ASSIGN] Backlog - Server Development Platform Team (SDP) (Inactive)
Resolution: Won't Do Votes: 1
Labels: Windows, sdp-backlog-purge
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Assigned Teams:
Server Development Platform
Participants:

 Description   

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.



 Comments   
Comment by Iryna Zhuravlova [ 16/Nov/22 ]

After a careful backlog refinement, the team decided to close this ticket because of its low priority and limited resource capacity. If you believe that this ticket requires additional attention from the team and should be re-opened, feel free to change the status to "Needs Scheduling" and ping me or @alexander.neben

Comment by Tad Marshall [ 16/Apr/12 ]

The current code sets "no restarts". Changing it to set one or two restarts is easy.

Generated at Thu Feb 08 03:01:58 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.