How to kill running query which is affecting my cluster performance badly .
How to kill running query which is affecting my cluster performance badly .
It isn't possible to kill long-running queries in C* since each query runs in a thread (not a separate process) and is executed in several replicas for any consistency level higher than one.
You can only determine the queries hitting your cluster if you have audit logging enabled. In Cassandra, this isn't enabled by default because it is expensive and has a significant effect on the performance of your cluster. It isn't easy to quantify the impact of audit logging because it depends on a lot of moving parts including use case, data model, access patterns, hardware configuration, etc.
Cassandra also logs slow queries by default. Queries are considered slow if they take longer than the slow query timeout in cassandra.yaml
:
slow_query_log_timeout_in_ms: 500
For details, see How to I collect slow queries in Apache Cassandra 3.11.6. Cheers!
I understand for future we can identified bad query and tune.
But still if we have to get rid of that query at run time , what we can do as a admin ?
Again, you can't kill in-flight queries other than restarting Cassandra on a node. Cheers!
5 People are following this question.
DataStax Enterprise is powered by the best distribution of Apache Cassandra ™
© 2023 DataStax, Titan, and TitanDB are registered trademarks of DataStax, Inc. and its subsidiaries in the United States and/or other countries.
Apache, Apache Cassandra, Cassandra, Apache Tomcat, Tomcat, Apache Lucene, Lucene, Apache Solr, Apache Hadoop, Hadoop, Apache Spark, Spark, Apache TinkerPop, TinkerPop, Apache Kafka and Kafka are either registered trademarks or trademarks of the Apache Software Foundation or its subsidiaries in Canada, the United States and/or other countries.
Privacy Policy Terms of Use