I often shutdown my comp with my MongoDB running...this is an improper shutdown and then I have to go delete the lockfile when I start up mongod again. What is the point of this lockfile? Can I just disable it for this case? Is it harmful for me to shut down in this way?
Asked
Active
Viewed 492 times
2 Answers
1
You should run MongoDB as a service, that way when you shutdown the OS it will stop the MongoDB service cleanly and your problem will go away. You don't mention what OS you are using but if on Linux, take a look at this page:
http://docs.mongodb.org/manual/tutorial/install-mongodb-on-debian-or-ubuntu-linux/
If on Windows take a look here:
http://www.mongodb.org/display/DOCS/Windows+Service
For OS X, you can either use port/brew or roll your own control scripts.

Adam Comerford
- 21,336
- 4
- 65
- 85