MongoDB ignores reconnect configuration for initial connection

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Won't Fix
    • Priority: Major - P3
    • None
    • Affects Version/s: 3.1.3
    • Component/s: None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Expected Behaviour:

      If the mongo server was not available on initial connect, the `reconnect` connection settings would attempt to `reconnect` to the database, until successful or until the retries were exhausted.

      Actual Behaviour:

      If the mongo server was not available on initial connect, the connection fails, and there is no further attempt to reconnect to the database, despite the presence of `reconnect` options.

      e.g.

      failed to connect to server [db:27017] on first connect

      Context:

      This is a especially a problem for virtual environments, where there is no guarantee that the mongo server has started before other containers.

       

      I'm currently using the following promise-retry library, as a workaround to mimic the desired `reconnect` behaviour on startup.

              Assignee:
              Matt Broadstone
              Reporter:
              Nick G
              None
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: