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

mongorestore exits in response to SIGHUP, even when run under nohup

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 3.0.7, 3.1.9
    • Affects Version/s: 3.0.4
    • Component/s: mongorestore
    • None
    • Environment:
      Amazon Linux 2015.03
    • Server Tools A (10/09/15)

      mongorestore installs a signal handler for sighup (on 3.0.x: https://github.com/mongodb/mongo-tools/blob/r3.0.4/common/signals/signals_unix.go master: https://github.com/mongodb/mongo-tools/blob/master/mongorestore/mongorestore.go#L448) that among other things exits the mongorestore process.

      This overwrites the what nohup does to mark the signal as ignorable and means that an invocation such as

      nohup mongorestore path/to/dump

      will be terminated if the SSH session is disconnection, which is annoying since this is an operation that frequently takes many hours. The 2.6 versions of the tools did not explicitly handle SIGHUP.

      I have encountered this using mongorestore but I suspect it affects other tools too.

            Assignee:
            gabriel.russell@mongodb.com Gabriel Russell (Inactive)
            Reporter:
            fcheung Frederick Cheung
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: