skip to main content
Troubleshooting : Troubleshooting Operation Timeouts
  

Try DataDirect Drivers Now

Troubleshooting Operation Timeouts

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 ReadConsistency connection property. 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 ReadConsistency to a value that requires fewer replicas to respond.
*Adjust the WriteConsistency connection property. 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 WriteConsistency to a value that requires fewer replicas to acknowledge the execution of the write operation.
*Decrease the value of the NativeFetchSize connection property. By decreasing NativeFetchSize, 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 NativeFetchSize 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.
1. Limit the number of results returned.
2. Add indexes to Cassandra tables and base operations on indexes as appropriate.
3. 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.
*A deep look at the CQL WHERE clause
*Filtering data using WHERE
*Adjust Cassandra network timeout settings in the cassandra.yml 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.