You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by richard yao <ri...@gmail.com> on 2010/04/15 06:58:45 UTC

TException: Error: TSocket: timed out reading 1024 bytes from 10.1.1.27:9160

I am having a try on cassandra, and I use php to access cassandra by thrift
API.
I got an error like this:
    TException:  Error: TSocket: timed out reading 1024 bytes from
10.1.1.27:9160
What's wrong?
Thanks.

Re: TException: Error: TSocket: timed out reading 1024 bytes from 10.1.1.27:9160

Posted by Mike Peters <ca...@softwareprojects.com>.
Hi guys, 

There are several patches you need to apply to Thrift to completely resolve
all timeout errors. 

Here's a list of them along with a link to download a patched thrift
library: 
http://www.softwareprojects.com/resources/programming/t-php-thrift-library-for-cassandra-1982.html
http://www.softwareprojects.com/resources/programming/t-php-thrift-library-for-cassandra-1982.html 
-- 
View this message in context: http://cassandra-user-incubator-apache-org.3065146.n2.nabble.com/TException-Error-TSocket-timed-out-reading-1024-bytes-from-10-1-1-27-9160-tp4905687p5478055.html
Sent from the cassandra-user@incubator.apache.org mailing list archive at Nabble.com.

Re: TException: Error: TSocket: timed out reading 1024 bytes from 10.1.1.27:9160

Posted by Pieter Maes <ma...@gmail.com>.
I have the same problem. (same lib)

I'm using phpcassa lib on thrift but i got from time to time (verry
random) "timed out reading 4 bytes from.."
I did the patch and changed to framed transport.
so i'm not sure what goes wrong :/
i'l try to get some extra debug and how to replicate te problem.. but
again.. it happens verry random.

Best regards
Pieter Maes

Op 22/04/10 03:30, Ken Sandney schreef:
> I've tried the patch on
> https://issues.apache.org/jira/browse/THRIFT-347 , but still got this
> error:
>
>     PHP Fatal error:  Uncaught exception 'TException' with message
>     'TSocket: timed out reading 1024 bytes from 10.0.0.169:9160
>     <http://10.0.0.169:9160>' in
>     /home/phpcassa/include/thrift/transport/TSocket.php:266
>     Stack trace:
>     #0
>     /home/phpcassa/include/thrift/transport/TBufferedTransport.php(126):
>     TSocket->read(1024)
>     #1 [internal function]: TBufferedTransport->read(8192)
>     #2
>     /home/phpcassa/include/thrift/packages/cassandra/Cassandra.php(642):
>     thrift_protocol_read_binary(Object(TBinaryProtocolAccelerated),
>     'cassandra_Cassa...', false)
>     #3
>     /home/phpcassa/include/thrift/packages/cassandra/Cassandra.php(615):
>     CassandraClient->recv_batch_insert()
>     #4 /home/phpcassa/include/phpcassa.php(197):
>     CassandraClient->batch_insert('Pujia', '38426', Array, 0)
>     #5 /home/phpcassa/test1.php(46): CassandraCF->insert('38426', Array)
>     #6 {main}
>       thrown in /home/phpcassa/include/thrift/transport/TSocket.php on
>     line 266
>
>

Re: TException: Error: TSocket: timed out reading 1024 bytes from 10.1.1.27:9160

Posted by Ken Sandney <bl...@gmail.com>.
I've tried the patch on https://issues.apache.org/jira/browse/THRIFT-347 ,
but still got this error:

PHP Fatal error:  Uncaught exception 'TException' with message 'TSocket:
> timed out reading 1024 bytes from 10.0.0.169:9160' in
> /home/phpcassa/include/thrift/transport/TSocket.php:266
> Stack trace:
> #0 /home/phpcassa/include/thrift/transport/TBufferedTransport.php(126):
> TSocket->read(1024)
> #1 [internal function]: TBufferedTransport->read(8192)
> #2 /home/phpcassa/include/thrift/packages/cassandra/Cassandra.php(642):
> thrift_protocol_read_binary(Object(TBinaryProtocolAccelerated),
> 'cassandra_Cassa...', false)
> #3 /home/phpcassa/include/thrift/packages/cassandra/Cassandra.php(615):
> CassandraClient->recv_batch_insert()
> #4 /home/phpcassa/include/phpcassa.php(197):
> CassandraClient->batch_insert('Pujia', '38426', Array, 0)
> #5 /home/phpcassa/test1.php(46): CassandraCF->insert('38426', Array)
> #6 {main}
>   thrown in /home/phpcassa/include/thrift/transport/TSocket.php on line 266
>

Re: TException: Error: TSocket: timed out reading 1024 bytes from 10.1.1.27:9160

Posted by richard yao <ri...@gmail.com>.
Thank you!

Re: TException: Error: TSocket: timed out reading 1024 bytes from 10.1.1.27:9160

Posted by Jonathan Ellis <jb...@gmail.com>.
sounds like https://issues.apache.org/jira/browse/THRIFT-347

On Wed, Apr 14, 2010 at 11:58 PM, richard yao <ri...@gmail.com> wrote:
> I am having a try on cassandra, and I use php to access cassandra by thrift
> API.
> I got an error like this:
>     TException:  Error: TSocket: timed out reading 1024 bytes from
> 10.1.1.27:9160
> What's wrong?
> Thanks.