Uploaded image for project: 'MongoDB Database Tools'
  1. MongoDB Database Tools
  2. TOOLS-929

mongorestore crashes because of excessive use of open files (exception 24)

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Blocker - P1 Blocker - P1
    • None
    • Affects Version/s: 3.0.6
    • Component/s: mongorestore
    • Environment:
      ubuntu 12.04 LTS running mongodb 3.0.6 64 bit (bundled download from the website)
    • v2.6

      mongorestore crashes importing a database dump with a large number of collections:

      Failed: restore error: DATABASE.COLLECTION: error creating indexes for DATABASE.COLLECTION: createIndex error: exception: 24: Too many open files

      As a consequence the database is not imported completely and the server daemon crashes!

      Elevating the number of open files possible for ubuntu to the maximum accepted value (4096) it still crashes, just at a later stage than before.

      I think it is definitely a bug - not a feature - if the program runs out of filehandles when already set to a maximum of 4096. It should really free some file resources on the way!
      Also since restoring a database is not that much of a time-critical application in most cases. I could not think of any justification for such an excessive use of resources that makes it unusable for large databases.

      With the current version I could not restore my database, which is rather bad

      Best,

      Maik

            Assignee:
            gabriel.russell@mongodb.com Gabriel Russell (Inactive)
            Reporter:
            bugdigger Mark Henzel
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: