Reputation: 177
I've tried:
SCP the (custom) DB directory from old machine to new machine - didn't work. Mongo complained of corrupt wiredTiger files
Ran mongodump and mongorestore - took about 5 times as long. The process was interrupted by someone who thought it'd finished, so missed a small amount of data
Realised 1. didn't work due to mongo not shutting down properly first.
Tried again, results in the following error:
2017-05-20T17:12:04.407+0100 E STORAGE [initandlisten] WiredTiger (24) [1495296724:407111][46215:0x7f7bf304bb80], file:collection-299--5136948165504185516.wt, session.open_cursor: /home/myuser/mymongodir/data/db//collection-299--5136948165504185516.wt:
Too many open files 2017-05-20T17:12:04.407+0100 I - [initandlisten] Invariant failure: ret resulted in status UnknownError 24: Too many open files at src/mongo/db/storage/wiredtiger/wiredtiger_session_cache.cpp 69`
Upvotes: 0
Views: 221
Reputation: 35796
You should try to run:
ulimit -a
It will gives you the current open limit, you can then increase it accordingly using the -n
option, which will increase the limit of your open files, allowing mongo to run safely.
Upvotes: 2