Repair database killing the process.

117 views
Skip to first unread message

nidhi sanghavi

unread,
Aug 2, 2016, 2:38:15 AM8/2/16
to mongodb-user
We have mongo server installed on our RHEL server with 2GB of RAM. 
We faced one unexpected shutdown of the mongo server.

Now, we are trying to repair it using following commands :

> rm /var/lib/mongo/mongod.lock
> mongod --repair --dbpath /var/lib/mongo

but the process is killed automatically with error message : "killed". No other information.

We found that it may be due to memory issue. 

So, how to limit the memory usage for recovering data?

Chris Cunningham

unread,
Aug 15, 2016, 9:11:37 PM8/15/16
to mongodb-user

Hi Nidhi,

Can you please provide some additional information on your implementation?

  1. What version of MongoDB are you running? Please issue the following from the mongo shell and send the results:

db.version()

  1. Is this a Standalone deployment or is it a Replica Set or Sharded Cluster?
  2. Is this deployment shared with other resource-intensive process (e.g. other servers, etc), or is it dedicated to MongoDB?
  3. What caused the need for running repairDatabase? Did you experience an error or is this a precaution against data corruption?
  4. Can you clarify what you mean by “the process is killed automatically”? What exactly happens?
  5. Please note that the repairDatabase FAQ does require disk space to function, but makes no mention of additional memory requirements. Can you please verify that you are not running out of disk space?

It is unusual that nothing is written to the MongoDB logs, it might be helpful to try increasing the logging level and replicating the issue to see if any additional information is written to the mongodb.log when the failure occurs.

Regards,

Chris


Reply all
Reply to author
Forward
0 new messages