Operation timeouts
- Last Updated: July 25, 2025
- 2 minute read
- DataDirect Connectors
- ODBC
- Apache Cassandra 8.0
- Documentation
Cassandra imposes timeouts on read and write operations to prevent a given operation from negatively impacting the performance of the cluster. If you encounter an operation timeout, you can take the following actions to promote operation success.
- Adjust the Read Consistency (ReadConsistency) connection option. You can speed up a query by reducing the number of replicas required to respond to a read request. Therefore, you can reduce the likelihood of a timeout by setting Read Consistency to a value that requires fewer replicas to respond.
- Adjust the Write Consistency (WriteConsistency) connection option. You can speed up a write operation by reducing the number of replicas required to acknowledge success. Therefore, you can reduce the likelihood of a timeout by setting Write Consistency to a value that requires fewer replicas to acknowledge the execution of the write operation.
- Decrease the value of the Native Fetch Size (NativeFetchSize) connection
option. By decreasing Native Fetch Size, you reduce the amount of data that must be
transmitted between the driver and the native data source. For read operations, the smaller
the chunks of data requested, the faster the cluster can assemble results for transmission
to the driver. For write operations, smaller chunks of data allow the driver to communicate
more efficiently with the native data source and thus expedite write operations.Note: Setting Native Fetch Size too low negatively impacts performance by requiring unnecessary round trips across the network.
- Optimize your query by taking one or more of the following actions.
- Limit the number of results returned.
- Add indexes to Cassandra tables and base operations on indexes as appropriate.
- Use Where clause filtering that can be pushed down to Cassandra, allowing operations to be evaluated and handled quickly. Refer to the following DataStax Web pages for more information about Where clause functionality and limitations.
- Adjust Cassandra network timeout settings in the cassandra.yaml configuration file. These settings can be adjusted to promote read operation success by increasing the size of the timeout window. Refer to your Apache Cassandra documentation for details.