Insufficient free space for journal files

前两天请假了,公司的很多app突然挂掉了,说是mongodb莫名的挂掉了,赶紧进去看了看日志:

2015-08-31T14:06:20.070+0800 [initandlisten] ERROR: Insufficient free space for journal files
2015-08-31T14:06:20.070+0800 [initandlisten] Please make at least 3379MB available in /data/mongodb/data/journal or use --smallfiles
2015-08-31T14:06:20.070+0800 [initandlisten]
2015-08-31T14:06:20.070+0800 [initandlisten] exception in initAndListen: 15926 Insufficient free space for journals, terminating
2015-08-31T14:06:20.070+0800 [initandlisten] dbexit:
2015-08-31T14:06:20.071+0800 [initandlisten] shutdown: going to close listening sockets...
2015-08-31T14:06:20.071+0800 [initandlisten] shutdown: going to flush diaglog...
2015-08-31T14:06:20.071+0800 [initandlisten] shutdown: going to close sockets...
2015-08-31T14:06:20.071+0800 [initandlisten] shutdown: waiting for fs preallocator...
2015-08-31T14:06:20.071+0800 [initandlisten] shutdown: lock for final commit...
2015-08-31T14:06:20.071+0800 [initandlisten] shutdown: final commit...
2015-08-31T14:06:20.071+0800 [initandlisten] shutdown: closing all files...
2015-08-31T14:06:20.071+0800 [initandlisten] closeAllFiles() finished
2015-08-31T14:06:20.071+0800 [initandlisten] journalCleanup...
2015-08-31T14:06:20.071+0800 [initandlisten] removeJournalFiles
2015-08-31T14:06:20.075+0800 [initandlisten] shutdown: removing fs lock...
2015-08-31T14:06:20.075+0800 [initandlisten] dbexit: really exiting now

查了查,原来是因为mongodb对硬盘的增长是以倍数增长的,每次增加2G,查了查服务器的硬盘空间,我去,剩下1.8G了

看到错误日志中解决的办法是使用 --smallfiles参数,然后我就试了试

./mongod --dbpath /data/mongodb/data --logpath /data/mongodb/mongodb.log --smallfiles

好是好了,可是一直在输出log,只要一终止,mongodb就又挂了,然后看了看mongodb的参数。找到了一个 --fork ,创建一个子进程参数。好的

./mongod --dbpath /data/mongodb/data --logpath /data/mongodb/mongodb.log --smallfiles --fork

搞定~~

  

时间: 2024-08-05 13:37:49

Insufficient free space for journal files的相关文章

here was insufficient free space available after evicting expired cache entries - consider increasing the maximum size of the cache

tomcat重启后报以下错误: 09-Dec-2016 10:57:49.150 WARNING [localhost-startStop-1] org.apache.catalina.webresources.Cache.getResource Unable to add the resource at [/WEB-INF/classes/struts/PersonnelActio n.xml] to the cache because there was insufficient free

《转》couldn't connect to server 127.0.0.1:27017 at src/mongo/shell/mongo.js:145

couldn't connect to server 127.0.0.1:27017 at src/mongo/shell/mongo.js:145,有须要的朋友能够參考下. 应为昨天安装的时候没及时截图,语言表达有点差,谅解 昨天在安装mongodb的时候无故出现 couldn't connect to server 127.0.0.1:27017 at src/mongo/shell/mongo.js:145 这种一个错误.后来google了下,基本都是说的没有正常关闭.产品了个mongod

20140921bug

mongodb启动正常,启动后使用mongo命令连接,连一次mongodb进程挂一次, 最后看日志: 2014-09-21T10:44:26.400+0800 [initandlisten] ERROR: Insufficient free space for journal files 2014-09-21T10:44:26.400+0800 [initandlisten] Please make at least 3379MB available in /usr/local/mongodb/

packstack 部署遇到的坑

centos7 部署icehouse 遇到了好多坑 第一次安装使用 使用 packstack --allinone  失败 重复安装的时候使用第一次生成的 answer-file packstack --answer-file=/root/packstack-answers-20161115-033728.txt SequenceError: Error appeared during Puppet run: 10.0.4.15_mariadb.ppError: mysqladmin -u ro

在EC2上安装MEAN环境

本文在个人博客上的地址为URL,欢迎品尝. 搭建决策树项目外网DEMO尝试几个地方后,最后选择了EC2(Amazon Elastic Compute Cloud).选择的是最经济便宜的Amazon Linux AMI系统t2.micro型(前期免费).因为是基于Red Hat的发行版本的系统,操作和在实验室的centos类似,本文结合了上一篇搭建NodeJS环境,并包含安装MongoDB的事宜,当然还包括扰人的Amazon远程连接的安全机制了. 使用PuTTY连接 首先需要将EC2生成的私钥(.

《转》couldn't connect to server 127.0.0.1:27017 at src/mongo/shell/mongo.js:145

couldn't connect to server 127.0.0.1:27017 at src/mongo/shell/mongo.js:145,有需要的朋友可以参考下. 应为昨天安装的时候没及时截图,语言表达有点差,谅解 昨天在安装mongodb的时候无故出现 couldn't connect to server 127.0.0.1:27017 at src/mongo/shell/mongo.js:145 这样的一个错误,后来google了下,基本都是说的没有正常关闭,产品了个mongo

journal.c文件剖析

代码分析: 一开始就认为该文件主要是为了事务的回滚,而生成日志文件记录下数据,但是没有找到任何的证明. 如下是函数的翻译: 当atomic-write 优化选项被启用的时候,SQLite会调用sqlite3_file对象创建日志文件. sqlite3_file文件的显著特点是延迟写磁盘.当创建该文件之后,如果用户调用read或者 write函数,调用者会指定缓存区去缓存用户数据,并没有真正创建磁盘文件,除非如下的 条件发生: 1)缓存的数据量过大 2)调用sqlite3JournalCreate

Linux LVM学习总结——Insufficient Free Extents for a Logical Volume

如下所示,在创建LV的时候,偶尔会遇到"Volume group "xxxx" has insufficient free space (xxxx extents): xxxx required"这类错误.表示Volume group的可用空间不够了.如下测试所示: [email protected]:~# lvcreate -L +623G -n LogVol01 VolGroup01   Volume group "VolGroup01" h

linux高级文件系统管理——LVM

在企业里面,很多时候,我们也无法估量应用程序对磁盘空间的使用量,如果我们使用用传统的文件系统,磁盘分区一旦确定下来以后,就再也无法更改使用空间了,如果需要更改就必须让应用程序离线后,对原有分区的数据进行备份,然后再对磁盘进行重新分区格式,重新复制原来的数据放回新的磁盘分区上,由此带来的麻烦是不言而喻的,如果是可以离线的业务,到也好说,如果是不允许离线的业务,那就影响更大.所以一代全新的文件系统LVM的问世,打破了这一技术瓶颈.它允许用户使用容量不不统一的硬盘和分区组合在一起,构成一个逻辑空间,用