Ted

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::

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
posted on 2011-12-30 22:13  wufawei  阅读(966)  评论(0编辑  收藏  举报