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

Disable async stream connections to avoid failed IPv6 connections

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical - P2
    • Resolution: Fixed
    • Affects Version/s: 1.0.0
    • Fix Version/s: 1.1.0
    • Labels:
      None
    • Sprint:
      PHP Sprint 29

      Description

      From Hannes Magnusson's description in mongodb/mongo-php-driver/#166:

      When doing async connections we can't properly determine if we should connect over IPv6 or IPv4. PHP will unfortunately default to connecting over IPv6 (when compiled in support, with minor runtime check), while mongod does not support IPv6 by default.

      When then creating the IPv6 connection asynchronously, PHP hits EINPROGRESS and will happily return the socket as valid.

      There currently is no way to configure these functions to prefer IPv4. The best we can do for now is to not connect asynchronously as then we'll properly discover that the IPv6 socket failed, and then continue through the list of addrinfo and next pickup the IPv4 address which works.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              bjori Hannes Magnusson
              Reporter:
              jmikola Jeremy Mikola
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: