Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cassandra TimeOut?

I have a large dataset in a single table (over 2 million rows, each with over 100 columns), stored in cassandra, a few months ago (2 maybe?) I was able to execute a simple command to keep track of the amount of records in that table:

SELECT count(*) from mydata limit 11111111;

A few days ago I tried the same command and got the following error:

errors={}, last_host=168.176.61.25

The error itself does not say much, After some research on google I think it might be related to a timeout. As you might expect shorter running queries execute properly, and the error appears always after some 10 seconds of processing.

A far as I understand, the timeouts for cassandra are set in cassandra.yaml, I have changed the following values

read_request_timeout_in_ms: 25000

range_request_timeout_in_ms: 25000

request_timeout_in_ms: 25000

However there is no change at all on the error and it still fails after the same 10 seconds,

Any ideas?

Thanks a lot

Fuanka

like image 562
Fuanka Avatar asked Feb 04 '26 23:02

Fuanka


1 Answers

If you only want the to count how many records, don't use count(*), put a counter column in your schema: http://www.datastax.com/documentation/cql/3.0/cql/cql_using/use_counter_t.html

if you also need to get all the data for other operation, there are multiple reseasons of this timeout, I can provide you with some if you need to.

like image 62
Manhal Daaboul Avatar answered Feb 06 '26 17:02

Manhal Daaboul



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!