Can't map file memory in MongoDB Can't map file memory in MongoDB mongodb mongodb

Can't map file memory in MongoDB


Stopping the service, deleting the lock file, and then doing a mongod --repair worked, even though db.repairDatabase did not.


The answer from Justin worked for me.

Here are some more detailed instructions for Ubuntu:

Stop Mongo Service: sudo service mongodb stopDelete Lock File: sudo rm /var/lib/mongodb/mongod.lockRepair the DB: sudo mongod --repair --dbpath=/var/lib/mongodbRestart the Mongo Service: sudo service mongodb start

Hope that helps someone.

(edited - note that mongodb is the service name, but mongod is the correct command for repairing)