I have a three nodes Cassandra Cluster and I have created one table which has more than 2,000,000 rows.
When I execute this (select count(*) from userdetails
I'm using Cassandra 3.11 and cqlsh to get record counts. My table is about 40,000,000 rows and i was forced with this problem. my problem solved with two changes:
first is change all timeout configs in 'cassandra.yaml' on all node:
# 3,600,000 is one hour in ms
read_request_timeout_in_ms: 3600000
range_request_timeout_in_ms: 3600000
write_request_timeout_in_ms: 3600000
counter_write_request_timeout_in_ms: 3600000
cas_contention_timeout_in_ms: 3600000
truncate_request_timeout_in_ms: 3600000
request_timeout_in_ms: 3600000
slow_query_log_timeout_in_ms: 3600000
then restart cassandra on all node.
and second is running 'cqlsh' with specify timeout like below:
cqlsh --request-timeout=3600000 <myhost>