Uploaded image for project: 'PHP Driver: Extension'
  1. PHP Driver: Extension
  2. PHPC-723

Blocking connect() leads to cumulative timeouts for multiple inaccessible servers

    XMLWordPrintableJSON

Details

    • Task
    • Status: Closed
    • Major - P3
    • Resolution: Done
    • 1.1.8
    • 1.2.0
    • None
    • None

    Description

      Hello,
      Previous 'legacy' PHP driver used to connect() to mongo servers using blocking sockets since https://github.com/mongodb/mongo-php-driver/pull/166
      https://jira.mongodb.org/browse/PHPC-512
      .
      When a mongo server process is down the OS' TCP stack can reject any request to connect() with an error, it's a near immediate answer. But when the server hosting mongo process is down (turned off/crashed), connectTimeoutMS (timeout option in driver) is fired. On a replicaset using 4 nodes with two nodes per datacenter (and 1 arbiter on a third Datacenter) it means a datacenter crash or network outage between the two main datacenters can generate 2*connectTimeoutMS delay, even if remaining servers are enough to satisfy queries (One PRIMARY and One SECONDARY, if using w<=2).
      As socket connect() client side is blocking, the total time to connect to a cluster can be large.
      So I would like to upgrade my application from legacy driver to latest one which moved its internals to mongo c driver to connect to cluster but does new driver present the same behaviour (large delay to connect on crash servers) or does it fix it ?
      Please could you confirm ?
      Thanks.
      Regards.

      Attachments

        Issue Links

          Activity

            People

              jmikola@mongodb.com Jeremy Mikola
              lglayal Laurent Glayal
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: