exception - Cassandra frequent read time out errors -


i new cassandra knows basics of it. facing frequent exceptions in cassandra. i'm using thrift api single node cassandra. doing writes involves existing check.

i tried increasing read_request_timeout_in_ms 10s large no: 9480secs. got timeout errors. not know exact reason behind this.

here stacktrace :

org.apache.thrift.transport.ttransportexception: java.net.sockettimeoutexception: read timed out         @ org.apache.thrift.transport.tiostreamtransport.read(tiostreamtransport.java:129)     @ org.apache.thrift.transport.ttransport.readall(ttransport.java:84)     @ org.apache.thrift.transport.tfastframedtransport.readframe(tfastframedtransport.java:140)     @ org.apache.thrift.transport.tfastframedtransport.read(tfastframedtransport.java:134)     @ org.apache.thrift.transport.ttransport.readall(ttransport.java:84)     @ org.apache.thrift.protocol.tbinaryprotocol.readall(tbinaryprotocol.java:378)     @ org.apache.thrift.protocol.tbinaryprotocol.readi32(tbinaryprotocol.java:297)     @ org.apache.thrift.protocol.tbinaryprotocol.readmessagebegin(tbinaryprotocol.java:204)     @ org.apache.thrift.tserviceclient.receivebase(tserviceclient.java:69)     @ org.apache.cassandra.thrift.cassandra$client.recv_set_keyspace(cassandra.java:531)     @ org.apache.cassandra.thrift.cassandra$client.set_keyspace(cassandra.java:518)     @  @ java.util.concurrent.futuretask$sync.innerrun(futuretask.java:303)     @ java.util.concurrent.futuretask.run(futuretask.java:138)     @ java.util.concurrent.executors$runnableadapter.call(executors.java:441)     @ java.util.concurrent.futuretask$sync.innerrun(futuretask.java:303)     @ java.util.concurrent.futuretask.run(futuretask.java:138)     @ java.util.concurrent.threadpoolexecutor$worker.runtask(threadpoolexecutor.java:886)     @ java.util.concurrent.threadpoolexecutor$worker.run(threadpoolexecutor.java:908)     @ java.lang.thread.run(thread.java:619) caused by: java.net.sockettimeoutexception: read timed out        @ java.net.socketinputstream.socketread0(native method)     @ java.net.socketinputstream.read(socketinputstream.java:129)     @ org.apache.thrift.transport.tiostreamtransport.read(tiostreamtransport.java:127)     ... 25 more 

what's going on here you've told cassandra let queries run long time, haven't told thrift client wait long reply cassandra.

but really, 10s plenty of time. don't change that. instead, figure out why queries taking longer tracing: http://www.datastax.com/dev/blog/tracing-in-cassandra-1-2

additionally, should check out data modeling resources here: https://wiki.apache.org/cassandra/datamodel. existance-check-before-write design smell.


Comments