• 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,刚好不够了~

    看到错误日志中解决的办法是使用 --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

    搞定~~

     但是这次的事情能反映好多问题,运维方面的东西需要多多加强了~~,感觉自己简直弱爆了

      

  • 相关阅读:
    mysql 修改时锁定技术
    eclipse配置java虚拟机的方法 转
    Highcharts2.3.2 网页曲线绘制工具 一淘网价格曲线
    Linux Shell常用技巧(目录) by Stephen Liu
    为zend studio添加phpdocumentor插件
    graphviz入门
    性价比超高的北斗小辣椒
    notepad++和graphviz配合使用
    搜狗的三级火箭
    电信版小黄蜂 双模天语E619亮相3G展会
  • 原文地址:https://www.cnblogs.com/qiangweikang/p/mongodb_01.html
Copyright © 2020-2023  润新知