The first two days of leave, the company's many apps suddenly hung up, said is MongoDB inexplicable hang off, hurriedly went in to look at the log:
-- ,-31T14: .:20.070+0800[Initandlisten] Error:insufficient FreeSpace forJournal Files -- ,-31T14: .:20.070+0800[Initandlisten] Please MakeAt least 3379MB availableinch/data/mongodb/data/journal or use--Smallfiles -- ,-31T14: .:20.070+0800[Initandlisten] -- ,-31T14: .:20.070+0800[Initandlisten] ExceptioninchInitandlisten:15926Insufficient FreeSpace forjournals, terminating -- ,-31T14: .:20.070+0800[Initandlisten] dbexit: -- ,-31T14: .:20.071+0800[Initandlisten] shutdown:going to close listening sockets ... -- ,-31T14: .:20.071+0800[Initandlisten] shutdown:going to flush diaglog ... -- ,-31T14: .:20.071+0800[Initandlisten] shutdown:going to close sockets ... -- ,-31T14: .:20.071+0800[Initandlisten] Shutdown:waiting forFS Preallocator ... -- ,-31T14: .:20.071+0800[Initandlisten] Shutdown:lock forFinal commit ... -- ,-31T14: .:20.071+0800[Initandlisten] shutdown:final commit ... -- ,-31T14: .:20.071+0800[Initandlisten] shutdown:closing all files ... -- ,-31T14: .:20.071+0800[Initandlisten] Closeallfiles () finished -- ,-31T14: .:20.071+0800[Initandlisten] journalcleanup ... -- ,-31T14: .:20.071+0800[Initandlisten] Removejournalfiles -- ,-31T14: .:20.075+0800[Initandlisten] shutdown:removing FS lock ... -- ,-31T14: .:20.075+0800[Initandlisten] dbexit:really exiting now
Check, the original is because MongoDB to the growth of the drive is a multiplier increase, each increase of 2G, check the server's hard disk space, I go, the remaining 1.8G
The way to see the error log is to use the--smallfiles parameter, and then I tried.
./mongod--dbpath/data/mongodb/data--logpath/data/mongodb/mongodb.log--smallfiles
Good is good, but has been in the output log, as long as a stop, MongoDB is again hung, and then looked at the parameters of MongoDB. A--fork was found and a child process parameter was created. Good
./mongod--dbpath/data/mongodb/data--logpath/data/mongodb/mongodb.log--smallfiles--fork
Get it done ~
Insufficient free space for journal files