You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Christof Bornhoevd <cb...@gmail.com> on 2012/05/31 01:44:47 UTC

java.net.SocketTimeoutException while Trying to Drop a Collection

Hello,



We are using Cassandra 1.0.8 with Hector 1.0-5 on both Windows and Linux. In
our development/test environment we always recreate the schema in Cassandra
(first dropping all ColumnFamilies then recreating them) and then seeding
the test data. We simply use
cluster.dropColumnFamily(keyspace.getKeyspaceName(),
collectionName); to drop ColumnFamilies. The client is using
ThriftFramedTransport (configurator.setUseThriftFramedTransport(*true*);).



Every so often we run into the following exception (with different ColumnFa
milies):



Caused by: me.prettyprint.hector.api.exceptions.HectorTransportException:
org.apache.thrift.transport.TTransportException:
java.net.SocketTimeoutException: Read timed out

at me.prettyprint.cassandra.service.ExceptionsTranslatorImpl.translate(Exce
ptionsTranslatorImpl.java:33)

at me.prettyprint.cassandra.service.AbstractCluster$7.execute(AbstractClust
er.java:279)

at me.prettyprint.cassandra.service.AbstractCluster$7.execute(AbstractClust
er.java:266)

at me.prettyprint.cassandra.service.Operation.executeAndSetResult(Operation
.java:103)

at me.prettyprint.cassandra.connection.HConnectionManager.operateWithFailov
er(HConnectionManager.java:258)

at me.prettyprint.cassandra.service.AbstractCluster.dropColumnFamily(Abstra
ctCluster.java:283)

at me.prettyprint.cassandra.service.AbstractCluster.dropColumnFamily(Abstra
ctCluster.java:261)

at com.supervillains.plouton.cassandradatastore.CassandraDataStore.deleteCo
llection(CassandraDataStore.java:195)

... 57 more



Is this problem related to
https://issues.apache.org/jira/browse/CASSANDRA-<https://issues.apache.org/jira/browse/CASSANDRA-3551>
3551 <https://issues.apache.org/jira/browse/CASSANDRA-> (which should have
been fixed with Cassandra 1.0.6) or could there be anything we do wrong
here?



Thanks in advance for any kind help!

Chris

Re: java.net.SocketTimeoutException while Trying to Drop a Collection

Posted by aaron morton <aa...@thelastpickle.com>.
The default value for rpc_timeout is 10000 - 10 seconds. 

You want the socket timeout to be higher than the rpc_timeout otherwise the client will give up before the server. 

Cheers

-----------------
Aaron Morton
Freelance Developer
@aaronmorton
http://www.thelastpickle.com

On 1/06/2012, at 3:26 AM, Christof Bornhoevd wrote:

> Thanks a lot Aaron for the very fast response!
>  
> I have increased the CassandraThriftSocketTimeout from 5000 to 9000. Is this a reasonable setting?
> configurator.setCassandraThriftSocketTimeout(9000
> 
> );
> Cheers,
> Christof
> 
> 2012/5/31 aaron morton <aa...@thelastpickle.com>
> There are two times of timeouts. The thrift TimedOutException occurs when the coordinator times out waiting for the CL level nodes to respond. The error is transmitted back to the client and raised.  
> 
> This is a client side socket timeout waiting for the coordinator to respond. See the CassandraHostConfigurator.setCassandraThriftSocketTimeout() setting. 
> 
> Cheers
> 
> -----------------
> Aaron Morton
> Freelance Developer
> @aaronmorton
> http://www.thelastpickle.com
> 
> On 31/05/2012, at 11:44 AM, Christof Bornhoevd wrote:
> 
>> Hello,
>>  
>> We are using Cassandra 1.0.8 with Hector 1.0-5 on both Windows and Linux. In our development/test environment we always recreate the schema in Cassandra (first dropping all ColumnFamilies then recreating them) and then seeding the test data. We simply use cluster.dropColumnFamily(keyspace.getKeyspaceName(), collectionName); to drop ColumnFamilies. The client is using ThriftFramedTransport (configurator.setUseThriftFramedTransport(true);).
>>  
>> Every so often we run into the following exception (with different ColumnFamilies):
>>  
>> Caused by: me.prettyprint.hector.api.exceptions.HectorTransportException: org.apache.thrift.transport.TTransportException: java.net.SocketTimeoutException: Read timed out
>> at me.prettyprint.cassandra.service.ExceptionsTranslatorImpl.translate(ExceptionsTranslatorImpl.java:33)
>> at me.prettyprint.cassandra.service.AbstractCluster$7.execute(AbstractCluster.java:279)
>> at me.prettyprint.cassandra.service.AbstractCluster$7.execute(AbstractCluster.java:266)
>> at me.prettyprint.cassandra.service.Operation.executeAndSetResult(Operation.java:103)
>> at me.prettyprint.cassandra.connection.HConnectionManager.operateWithFailover(HConnectionManager.java:258)
>> at me.prettyprint.cassandra.service.AbstractCluster.dropColumnFamily(AbstractCluster.java:283)
>> at me.prettyprint.cassandra.service.AbstractCluster.dropColumnFamily(AbstractCluster.java:261)
>> at com.supervillains.plouton.cassandradatastore.CassandraDataStore.deleteCollection(CassandraDataStore.java:195)
>> ... 57 more
>>  
>> Is this problem related to https://issues.apache.org/jira/browse/CASSANDRA-3551 (which should have been fixed with Cassandra 1.0.6) or could there be anything we do wrong here?
>>  
>> Thanks in advance for any kind help!
>> Chris
> 
> 


Re: java.net.SocketTimeoutException while Trying to Drop a Collection

Posted by Christof Bornhoevd <cb...@gmail.com>.
Thanks a lot Aaron for the very fast response!

I have increased the CassandraThriftSocketTimeout from 5000 to 9000. Is
this a reasonable setting?

configurator.setCassandraThriftSocketTimeout(9000);
Cheers,
Christof

2012/5/31 aaron morton <aa...@thelastpickle.com>

> There are two times of timeouts. The thrift TimedOutException occurs when
> the coordinator times out waiting for the CL level nodes to respond. The
> error is transmitted back to the client and raised.
>
> This is a client side socket timeout waiting for the coordinator to
> respond. See the
> CassandraHostConfigurator.setCassandraThriftSocketTimeout() setting.
>
> Cheers
>
>    -----------------
> Aaron Morton
> Freelance Developer
> @aaronmorton
> http://www.thelastpickle.com
>
>  On 31/05/2012, at 11:44 AM, Christof Bornhoevd wrote:
>
>  Hello,
>
>
> We are using Cassandra 1.0.8 with Hector 1.0-5 on both Windows and Linux. In
> our development/test environment we always recreate the schema in Cassandra
> (first dropping all ColumnFamilies then recreating them) and then seeding
> the test data. We simply use cluster.dropColumnFamily(keyspace.getKeyspaceName(),
> collectionName); to drop ColumnFamilies. The client is using
> ThriftFramedTransport (configurator.setUseThriftFramedTransport(*true*);).
>
>
> Every so often we run into the following exception (with different ColumnFa
> milies):
>
>
> Caused by: me.prettyprint.hector.api.exceptions.HectorTransportException: org.apache.thrift.transport.TTransportException:
> java.net.SocketTimeoutException: Read timed out
> at me.prettyprint.cassandra.service.ExceptionsTranslatorImpl.translate(Exce
> ptionsTranslatorImpl.java:33)
> at me.prettyprint.cassandra.service.AbstractCluster$7.execute(AbstractClust
> er.java:279)
> at me.prettyprint.cassandra.service.AbstractCluster$7.execute(AbstractClust
> er.java:266)
> at me.prettyprint.cassandra.service.Operation.executeAndSetResult(Operation
> .java:103)
> at me.prettyprint.cassandra.connection.HConnectionManager.operateWithFailov
> er(HConnectionManager.java:258)
> at me.prettyprint.cassandra.service.AbstractCluster.dropColumnFamily(Abstra
> ctCluster.java:283)
> at me.prettyprint.cassandra.service.AbstractCluster.dropColumnFamily(Abstra
> ctCluster.java:261)
> at com.supervillains.plouton.cassandradatastore.CassandraDataStore.deleteCo
> llection(CassandraDataStore.java:195)
> ... 57 more
>
>
> Is this problem related to
> <https://issues.apache.org/jira/browse/CASSANDRA->
> https://issues.apache.org/jira/browse/CASSANDRA-<https://issues.apache.org/jira/browse/CASSANDRA-3551>3551
> (which should have been fixed with Cassandra 1.0.6) or could there be anything
> we do wrong here?
>
>
> Thanks in advance for any kind help!
> Chris
>
>
>

Re: java.net.SocketTimeoutException while Trying to Drop a Collection

Posted by aaron morton <aa...@thelastpickle.com>.
There are two times of timeouts. The thrift TimedOutException occurs when the coordinator times out waiting for the CL level nodes to respond. The error is transmitted back to the client and raised.  

This is a client side socket timeout waiting for the coordinator to respond. See the CassandraHostConfigurator.setCassandraThriftSocketTimeout() setting. 

Cheers

-----------------
Aaron Morton
Freelance Developer
@aaronmorton
http://www.thelastpickle.com

On 31/05/2012, at 11:44 AM, Christof Bornhoevd wrote:

> Hello,
>  
> We are using Cassandra 1.0.8 with Hector 1.0-5 on both Windows and Linux. In our development/test environment we always recreate the schema in Cassandra (first dropping all ColumnFamilies then recreating them) and then seeding the test data. We simply use cluster.dropColumnFamily(keyspace.getKeyspaceName(), collectionName); to drop ColumnFamilies. The client is using ThriftFramedTransport (configurator.setUseThriftFramedTransport(true);).
>  
> Every so often we run into the following exception (with different ColumnFamilies):
>  
> Caused by: me.prettyprint.hector.api.exceptions.HectorTransportException: org.apache.thrift.transport.TTransportException: java.net.SocketTimeoutException: Read timed out
> at me.prettyprint.cassandra.service.ExceptionsTranslatorImpl.translate(ExceptionsTranslatorImpl.java:33)
> at me.prettyprint.cassandra.service.AbstractCluster$7.execute(AbstractCluster.java:279)
> at me.prettyprint.cassandra.service.AbstractCluster$7.execute(AbstractCluster.java:266)
> at me.prettyprint.cassandra.service.Operation.executeAndSetResult(Operation.java:103)
> at me.prettyprint.cassandra.connection.HConnectionManager.operateWithFailover(HConnectionManager.java:258)
> at me.prettyprint.cassandra.service.AbstractCluster.dropColumnFamily(AbstractCluster.java:283)
> at me.prettyprint.cassandra.service.AbstractCluster.dropColumnFamily(AbstractCluster.java:261)
> at com.supervillains.plouton.cassandradatastore.CassandraDataStore.deleteCollection(CassandraDataStore.java:195)
> ... 57 more
>  
> Is this problem related to https://issues.apache.org/jira/browse/CASSANDRA-3551 (which should have been fixed with Cassandra 1.0.6) or could there be anything we do wrong here?
>  
> Thanks in advance for any kind help!
> Chris