1) Problem
When using MongoDB to insert data,"Exception 12520 FileAllocation failure"Error. As a result, the data cannot be successfully inserted into the database.
2) Analysis
After analysis, it is found that the disk space is full. After the redundant data is deleted, "exception 12520 File Allocation failure" still occurs. The solution is to restart MongoDB,
As mentioned in issues after running out of space: "The only way to get it to continue operating normally is to shut it down completely and start it back up. this is an issue for large datasets where it takes the cache a while to warm up ".
3) Enable and stop MongoDB
Starting and stopping Mongo provides the following information:
How to stop MongoDB:
$./Mongo> Use admin> dB. shutdownserver ()
Restart MongoDB
Run the following command:
$./Mongod -- fork -- logpath/VaR/Log/MongoDB. log -- logappend -- Port yourport