The windows server 2003 box hosting our MongoDB instance ran out of disk space, and Mongo started generating the error:
Can't map file memory.
After adding additional disk space to the server and restarting the MongoDB windows service, any operation against the database still generates the "Can't map file memory" error. I tried doing a repair even and it gives the same error:
> db.repairDatabase(); { "assertion" : "can't map file memory", "assertionCode" : 10085, "errmsg" : "db assertion failure", "ok" : 0 }
Any idea what I can do to get my database operational again??
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 stop
Delete Lock File: sudo rm /var/lib/mongodb/mongod.lock
Repair the DB: sudo mongod --repair --dbpath=/var/lib/mongodb
Restart 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)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With