Why mongodb is locked?
-
Hey folks, my development pc is 32 bit. and I work with mongodb. When I run the code I wrote, sometimes I get locked in MongoDB. I deleted from the file the problem solved. /var/lib/mongodb/mongod.lock So I always have to do it? Why MongoDB crashes?
-
Answer:
If mongodb is running and improper shutodown happens, then this problem appears. You can repair it by trying one of the following commands: 1. mongod --repair 2. mongod --dbpath /data/db --repair --repairpath /data/db 3. mongod --dbpath /data/db or from console(if service is running but db is corrupted ) > db.repairDatabase();
Jayant Gs at Quora Visit the source
Other answers
The lock file is used to detect improper crashes. Why don't you run with Journalling enabled so that you don't have to worry about the lock file. However I think in your case it will be better to find out why Mongodb is "freezing" in the first place. Look at /var/log/mongo/mongod.log - it might help
Dharshan Rangegowda
Related Q & A:
- Why will my yahoo toolbar not stay locked?Best solution by Yahoo! Answers
- Locked out of Windows XP, how do I get back in?Best solution by Super User
- Why am I locked out in Yahoo mail?Best solution by Yahoo! Answers
- Are PC Games Region Locked?Best solution by Yahoo! Answers
- Need help with my locked car radio.Best solution by Yahoo! Answers
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.