MongoDB gets corrupted after docker container restart (WT_NOTFOUND)

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Critical - P2
    • None
    • Affects Version/s: 3.3.9
    • Component/s: Storage
    • None
    • ALL
    • Hide
      • create a docker container from mongo:3.3.9
      • make a volume pointing to /data/db in the container
      • start the container, put some data in the db
      • stop the container
      • restart it
      Show
      create a docker container from mongo:3.3.9 make a volume pointing to /data/db in the container start the container, put some data in the db stop the container restart it
    • None
    • 0
    • None
    • None
    • None
    • None
    • None
    • None

      Sometimes, with no particular explicit reason, MongoDB gives me this error:

      [initandlisten] Detected data files in /data/db created by the 'wiredTiger' storage engine, so setting the active storage engine to 'wiredTiger'.
      [initandlisten] wiredtiger_open config: create,cache_size=1G,session_max=20000,eviction=(threads_max=4),config_base=false,statistics=(fast),log=(enabled=true,archive=true,path=journal,compressor=snappy),file_manager=(close_idle_time=100000),checkpoint=(wait=60,log_size=2GB),statistics_log=(wait=0),
      [initandlisten] Assertion: 28595:-31803: WT_NOTFOUND: item not found
      [initandlisten] exception in initAndListen: 28595 -31803: WT_NOTFOUND: item not found, terminating
      [initandlisten] dbexit:  rc: 100
      

      After restarting the associated Docker container with `Ctrl+C` or with `docker stop`.

      The container has a volume to persist `/data/db` directory on the host.

      Once again, most of the times (that is 99%), stopping and restarting the container works perfectly and MongoDB has no problem with that. But sometimes, I'm not able to restart the container because of the error shown above.

      When this happens, the only solution that has "worked" so far has been to empty the `data/db` directory on the host, and here we start with an empty (but working) db.

      I have to say that informations about `WT_NOTFOUND` error on the internet is quite sparse, so no amount of digging MongoDB issues has solved this problem so far.

            Assignee:
            Unassigned
            Reporter:
            Jivan Roquet
            Votes:
            0 Vote for this issue
            Watchers:
            15 Start watching this issue

              Created:
              Updated:
              Resolved: