-->
  • Recent Articles

    MongoDB Startup Error


    MongoDB:

    MongoDB is a cross-platform document-oriented database program. Classified as a NoSQL database program, MongoDB uses JSON-like documents with schema. MongoDB is developed by MongoDB Inc. and licensed under the Server Side Public License.
    After you install mongoDB and tried to start the mongoDB instance you'll come across this error if your data directory is less than equals to 4 GB. to mitigate this we need to do the following steps:

    Error:
    2016-07-29T02:36:20.731+0200 I JOURNAL  [initandlisten] Please make at least 3379MB available in /var/lib/mongo/journal or use --smallfiles
    2016-07-29T02:36:20.731+0200 I JOURNAL  [initandlisten]
    2016-07-29T02:36:20.732+0200 I STORAGE  [initandlisten] exception in initAndListen: 15926 Insufficient free space for journals, terminating
    2016-07-29T02:36:20.732+0200 I CONTROL  [initandlisten] now exiting




    Solution:



    For mongoDB 3.x do the following steps if your mongoDB data directory is having less than 3379MB available.

    1. vi /etc/mongod.conf
    2. Add following Lines and Save,Exit the Editor.
    storage:
       mmapv1:
          smallFiles: true
    3. Start the Service.
    [root@mongotest ~]# service mongod start
    Starting mongod:                                           [  OK  ]
    [root@mongotest ~]#


    Useful MongoDB Articles:

    No comments