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

Mongo locks should be purged (or at least ignored) when the server is started cold (while not currently running)

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • ALL

      A server had a failure in the middle of the night that caused a hard-reboot (nothing to do with Mongo) but then after boot the MongoDB service never started up again (turning the 1-minute of downtime into most of the night until a human would intervene.)

      The issue was that the Mongo server would not start up unless all locks are cleared, this was in the log:

                                • old lock file: /data/db/mongod.lock. probably means unclean shutdown
                                  recommend removing file and running --repair
                                  see: http://dochub.mongodb.org/core/repair for more information
                                  *************

      This seems great if you are restarting and really bad for a fresh-start when Mongo is not currently running. My startup script now has a clause for:
      mv /data/db/mongod.lock /data/db/mongod.lock.old

      But this is a hack - the Mongo server should just ignore the locks and start-up if there is no server currently active.

            Assignee:
            Unassigned Unassigned
            Reporter:
            phpmoadmin phpMoAdmin
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: