java - Astyanax not respecting configured socket timeout -


this setup:

  • 4 nodes cassandra 1.2.19
  • astyanax 1.56.49

i setting configuration like

astyanaxcontext<keyspace> context = new astyanaxcontext.builder()     .forcluster(service.getclustername())     .forkeyspace(service.getkeyspacename())     .withastyanaxconfiguration(new astyanaxconfigurationimpl()          .setdiscoverytype(nodediscoverytype.none)          .setcqlversion("3.0.0")          .setdefaultreadconsistencylevel(consistencylevel.getastyanaxvalue())          .setdefaultwriteconsistencylevel(consistencylevel.getastyanaxvalue())     )     .withconnectionpoolconfiguration(new connectionpoolconfigurationimpl("b2bconnectionpool")          .setport(service.getport())          .setmaxconnsperhost(5)          .setseeds(stringutils.join(hosts, ","))          // increase default timeout heavy operations (milliseconds)          .setsockettimeout(15000)          .setsslconnectioncontext(sslcontext)          .setauthenticationcredentials(credentials)     )     .withconnectionpoolmonitor(new countingconnectionpoolmonitor())     .buildkeyspace(thriftfamilyfactory.getinstance()); 

now there reproducible query takes long time , throws operationtimeoutexception:

com.netflix.astyanax.connectionpool.exceptions.operationtimeoutexception: operationtimeoutexception: [host=myhost(myip):13260, latency=10001(40007), attempts=4]timedoutexception()     @ com.netflix.astyanax.thrift.thriftconverter.toconnectionpoolexception(thriftconverter.java:171) ~[astyanax-thrift-1.56.49.jar:na]     @ com.netflix.astyanax.thrift.abstractoperationimpl.execute(abstractoperationimpl.java:65) ~[astyanax-thrift-1.56.49.jar:na]     @ com.netflix.astyanax.thrift.thriftcolumnfamilyqueryimpl$1$2.execute(thriftcolumnfamilyqueryimpl.java:190) ~[astyanax-thrift-1.56.49.jar:na]     @ com.netflix.astyanax.thrift.thriftcolumnfamilyqueryimpl$1$2.execute(thriftcolumnfamilyqueryimpl.java:182) ~[astyanax-thrift-1.56.49.jar:na]     @ com.netflix.astyanax.thrift.thriftsyncconnectionfactoryimpl$thriftconnection.execute(thriftsyncconnectionfactoryimpl.java:151) ~[astyanax-thrift-1.56.49.jar:na]     @ com.netflix.astyanax.connectionpool.impl.abstractexecutewithfailoverimpl.tryoperation(abstractexecutewithfailoverimpl.java:119) ~[astyanax-core-1.56.49.jar:na]     @ com.netflix.astyanax.connectionpool.impl.abstracthostpartitionconnectionpool.executewithfailover(abstracthostpartitionconnectionpool.java:338) ~[astyanax-core-1.56.49.jar:na]     @ com.netflix.astyanax.thrift.thriftcolumnfamilyqueryimpl$1.execute(thriftcolumnfamilyqueryimpl.java:180) ~[astyanax-thrift-1.56.49.jar:na] 

the exception message says "latency=10001" , thought should socket timeout configured 15000 ms it's not. how can increase timeout query operation in astyanax?

i getting similar timeout exception when trying query nodes bigger data. modified these 4 values in cassandra.yaml , resolved timeout errors.

how long coordinator should wait read operations complete read_request_timeout_in_ms: 15000

how long coordinator should wait seq or index scans complete range_request_timeout_in_ms: 30000

how long coordinator should wait writes complete write_request_timeout_in_ms: 30000

how long coordinator should wait counter writes complete counter_write_request_timeout_in_ms: 15000

note: need in nodes in cluster , need restart cassandra in of them.


Comments

Popular posts from this blog

Spring Boot + JPA + Hibernate: Unable to locate persister -

go - Golang: panic: runtime error: invalid memory address or nil pointer dereference using bufio.Scanner -

c - double free or corruption (fasttop) -