Uploaded image for project: 'Node.js Driver'
  1. Node.js Driver
  2. NODE-2407

UnifiedTopology + near read makes application crash with timeout error when one of replica server is down

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: 3.4.1
    • Fix Version/s: 3.5.8
    • Component/s: native
    • Labels:
      None
    • Environment:
      mongoose 5.8
    • MongoDB Version:
      4.2.2

      Description

      I have following setup. A replica set with 3 members.

      region1.mongodb.com, region2.mongodb.com, region3.mongodb.com

      I have configured my apps to use 'near' reads so servers in "region1" reads from region1.mongodb.com and so on.

       

      Now, issue comes when any one of replicaset member is down. For example, if say region2.mongodb.com is down, my application in region2 always keeps trying to connect to region2.mongodb.com and keeps crashing. It never moves on to select region1.mongodb.com or region3.mongodb.com and continue to work.

       

      The problem gets resolved when I put useUnifiedTopology: false.

        Attachments

          Activity

            People

            Assignee:
            matt.broadstone Matt Broadstone
            Reporter:
            aditya@patadia.org Aditya Patadia
            Participants:
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: