# Timeout, paging, memory: ReadTimeoutException: Cassandra timeout during read query at consistency

**URL:** <https://forum.scylladb.com/t/timeout-paging-memory-readtimeoutexception-cassandra-timeout-during-read-query-at-consistency/1463>\
**Category:** ScyllaDB\
**Tags:** drivers, troubleshooting, paging, spark\
**Created:** [April 7, 2024, 5:42am UTC](https://forum.scylladb.com/t/timeout-paging-memory-readtimeoutexception-cassandra-timeout-during-read-query-at-consistency/1463 "2024-04-07T05:42:26Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Guy](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.scylladb.com/guy/32/9_2.png) [@Guy](https://forum.scylladb.com/u/Guy)\
**Post date:** [April 7, 2024, 5:42am UTC](https://forum.scylladb.com/t/timeout-paging-memory-readtimeoutexception-cassandra-timeout-during-read-query-at-consistency/1463/1 "2024-04-07T05:42:26Z")

</div>

> [@](#):
>
> [**Originally from the User Slack**](https://scylladb-users.slack.com/)
> 
> **@Varun\_Nagrare:** Hi all, recently I’m facing a consistency error while reading data with Spark. I repaired my 3 node cluster with replication factor 3 but still it’s giving the same error. How to avoid this error?! Please help!!!
> 
> ![dor](https://us1.discourse-cdn.com/flex016/uploads/scylladb/original/1X/27b698a3e588f84cb82a722e458d31c997a48bed.jpeg) **@dor:** What’s the error msg?
> 
> **@Varun\_Nagrare:** @dor Below is the error I’m getting:
> 
> ```auto
> com.datastax.driver.core.exceptions.ReadTimeoutException: Cassandra timeout during read query at consistency LOCAL_ONE (1 responses were required but only 0 replica responded)
> 
> ```
> 
> Why would this occur even after repairing the cluster?
> 
> ![dor](https://us1.discourse-cdn.com/flex016/uploads/scylladb/original/1X/27b698a3e588f84cb82a722e458d31c997a48bed.jpeg) **@dor:** It’s not a consistency error but a timeout. If repair was finished already, could be it brough more sstables and now the nodes need to consolidate it. It depends what the machine is doing now  
> You can run slow query tracing and see how many sstables are read for this query
> 
> **@Varun\_Nagrare:** Please tell how to do slow query tracing?
> 
> ![dor](https://us1.discourse-cdn.com/flex016/uploads/scylladb/original/1X/27b698a3e588f84cb82a722e458d31c997a48bed.jpeg) **@dor:** it’s a cql feature, described in the docs
> 
> **@Varun\_Nagrare:** Also when checking the syslog I found out the below:
> 
> `scylla: [shard 0] mutation_partition - Memory usage of unpaged query exceeds soft limit of 1048576 (configured via max_memory_for_unlimited_query_soft_limit)`
> 
> ![dor](https://us1.discourse-cdn.com/flex016/uploads/scylladb/original/1X/27b698a3e588f84cb82a722e458d31c997a48bed.jpeg) **@dor:** That can certainly help - unpaged queries aren’t good  
> There is an advisor screen in grafana, check how many queries are unpaged
> 
> **@Varun\_Nagrare:** I’m reading the data using PySpark. So how to find if a query is unpaged? Since I don’t have grafana installed for monitoring it, is there any alternative for it?
> 
> ![dor](https://us1.discourse-cdn.com/flex016/uploads/scylladb/original/1X/27b698a3e588f84cb82a722e458d31c997a48bed.jpeg) **@dor:** It’s time to start read the docs and and run grafana…
> 
> **@Varun\_Nagrare:** Yes I know 😅. Just wanted to solve this asap. Anyways thanks for the help. I’ll go through the docs.
