MongoDB exception 12520 file allocation failure解决方法

1)问题

在使用MongoDB插入数据时,出现“exception 12520 file allocation failure” 错误,导致数据并不能成功插入数据库。

2)分析

经过分析发现,磁盘空间已满,删除冗余数据后,发现还是会出现“exception 12520 file allocation failure” ,解决方法就是重新启动MongoDB,

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)开启、停止MongoDB方法

Starting and Stopping Mongo中给出了:

停止MongoDB的方法:

$ ./mongo
> use admin
> db.shutdownServer()

重新开启MongoDB

使用命令:

 $ ./mongod --fork --logpath /var/log/mongodb.log --logappend --port yourport

转载于:https://www.cnblogs.com/wufawei/archive/2011/12/30/2308075.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值