Operation timed out - received only 0 responses - which time out?

1,449 views
Skip to first unread message

Kirill Khistyaev

unread,
Jan 22, 2016, 11:42:16 AM1/22/16
to DataStax C++ Driver for Apache Cassandra User Mailing List
I have a similar question to https://groups.google.com/a/lists.datastax.com/forum/#!searchin/cpp-driver-user/time$20out/cpp-driver-user/rz5KiL965Cc/jzvcxdRTBwAJ but since it was never addressed I decided to create a new one.
We are using RF = 3, consistence = QUORUM and default retry policy. We are getting an error "Operation timed out - received only 0 responses" and sometimes "received only 1 responses" for write requests when threads are stopped for a long time on one of the node (why that happens i s a separate issue).
I am trying to understand how this error is triggered. If I understand correctly write request is issued to all 3 replicas and than coordinator waits for the response from any two replicas. So even if one replica is paused that shouldn't cause an error.
What I don't understand is what happens if the coordinator is paused? Would that trigger the above time out message?
Also, which of the time outs is used in the case above? Is it driver time out settings or Cassandra?

Michael Penick

unread,
Jan 22, 2016, 1:38:57 PM1/22/16
to cpp-dri...@lists.datastax.com
Using RF = 3 with a consistency of QUORUM, at least two replicas need to respond for the request to succeed. You're correct in saying that one replica can timeout and the it shouldn't cause an error. 

If the coordinator itself fails to respond you'll see a "Request timed out" which will come from the driver. The errors you're seeing above, "Operation timed out - received only X responses", are coming from Cassandra replica timeouts.

 
Also, which of the time outs is used in the case above? Is it driver time out settings or Cassandra?

That's a Cassandra setting. Here are the "Network timeout settings" for Cassandra: https://docs.datastax.com/en/cassandra/2.2/cassandra/configuration/configCassandra_yaml.html?scroll=configCassandra_yaml__range_request_timeout_in_ms. However, those timeout are already pretty generous and there might be some other underlying issue with your Cassandra cluster.
 

--
You received this message because you are subscribed to the Google Groups "DataStax C++ Driver for Apache Cassandra User Mailing List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cpp-driver-us...@lists.datastax.com.

Kirill Khistyaev

unread,
Jan 24, 2016, 8:52:42 PM1/24/16
to cpp-dri...@lists.datastax.com
Thank you for detailed answer, Michael.
The other thing that I don't understand is ho I am getting " received only 0 responses". If I remember correctly driver uses token-aware policy by default. So coordinator should have one of the replicas. How it can get 0 responses?
Also, is there a way to print out which node was a coordinator node for a given request?

Reply all
Reply to author
Forward
0 new messages