Uploaded image for project: 'Thrift'
  1. Thrift
  2. THRIFT-638

BufferedTransport + C extensions block until recv timeout is reached on last fread call

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 0.2
    • Fix Version/s: 0.7
    • Component/s: PHP - Library
    • Labels:
      None

      Description

      I wanted to throw this out if any other folks experience this later on. At Digg we've been using the BufferedTransport + C extension of Thrift in PHP. Every so often, we will see spikes in latency increases on RPC calls that we know have acceptable response times (<200ms). This seems to happen based on how much data is being sent back over the wire. This is more of a PHP problem, but can be corrected in Thrift's PHP library for folks who don't want to upgrade PHP. I am still waiting to see if it's corrected in later versions (we use 5.2.9).

      http://bonsai.php.net/bug.php?id=42720

      Replacing the fread statements in TSocket.php with stream_socket_recvfrom correct this behavior so that calls do not wait until they hit the recv timeout.

        Attachments

        1. thrift-tsocket-638-0003.patch
          8 kB
          Nicholas Telford
        2. thrift-tsocket-638-0002.patch
          4 kB
          Nicholas Telford
        3. thrift-tsocket-638.patch
          3 kB
          Nicholas Telford
        4. 0002-tocket-read-meta-data-check.diff
          0.7 kB
          Arya Goudarzi
        5. 0001-Replace-freads-with-stream_socket_recvfrom.patch
          1 kB
          Chris Goffinet

          Issue Links

            Activity

              People

              • Assignee:
                nicktelford Nicholas Telford
                Reporter:
                lenn0x Chris Goffinet
              • Votes:
                2 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: