[
https://issues.apache.org/jira/browse/THRIFT-638?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13001978#comment-13001978
]
Nicholas Telford commented on THRIFT-638:
-----------------------------------------
Hi Tyler,
I've been working to reproduce the issues you're seeing using phpcassa and
cassandra. I noticed that phpcassa sets the default timeouts (send and recv) to
1 millisecond. I imagine this was meant to be in seconds as 1 millisecond seems
rather optimistic!
In my tests I set my timeouts to 10 seconds (the VM I'm testing on was swapping
badly so Cassandra needed some time to GC a lot) and could not reproduce those
problems.
I did notice that your tests take a very long time and a ton of CPU to run,
strace reveals that gettimeofday() is being called nearly constantly
(approximately every 200 microseconds). I don't think this is related so I
haven't gone in to too much detail looking for the culprit there, but I'm
pretty certain it's not Thrift.
If it's not too much trouble an EC2 instance would help a great deal in
tracking this down.
> BufferedTransport + C extensions block until recv timeout is reached on last
> fread call
> ---------------------------------------------------------------------------------------
>
> Key: THRIFT-638
> URL: https://issues.apache.org/jira/browse/THRIFT-638
> Project: Thrift
> Issue Type: Bug
> Components: PHP - Library
> Affects Versions: 0.2
> Reporter: Chris Goffinet
> Fix For: 0.7
>
> Attachments: 0001-Replace-freads-with-stream_socket_recvfrom.patch,
> 0002-tocket-read-meta-data-check.diff, thrift-tsocket-638-0002.patch,
> thrift-tsocket-638-0003.patch, thrift-tsocket-638.patch
>
>
> 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.
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira