Uploaded image for project: 'PHP Driver (Phongo)'
  1. PHP Driver (Phongo)
  2. PHPC-723

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

    XMLWordPrintable

    Details

    • Type: Question
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: 1.1.8
    • Fix Version/s: 1.2.0
    • Labels:
      None
    • # Replies:
      6
    • Last comment by Customer:
      false

      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

              • Votes:
                1 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since reply:
                  1 year, 35 weeks, 2 days ago
                  Date of 1st Reply: