Illustration Image

Cassandra.Link

The best knowledge base on Apache Cassandra®

Helping platform leaders, architects, engineers, and operators build scalable real time data platforms.

4/2/2021

Reading time:1 min

Cassandra – Fixing blocked Native Transport Requests

by John Doe

In our production Cassandra cluster (At the time of this post was DSE 5.1.18), we were seeing the Total Blocked count for the stat Native-transport-requests increasing regularly on each node. The Native-transport-request metric represents any CQL request.Here is the view we were seeing on each node in OpsCenter:The issue was because we were using the default value of 128 for max_queued_native_transport_requests which is set in cassandra-env.sh.Once the limit is reached for max queued requests any new requests are dropped. Increasing the queue size would allow more space for backed up requests to queue rather than just being dropped.The solution was to increase the queue size from 128 to 1024 by adding the following line to the end of the cassandra-env.sh file on each node:JVM_OPTS="$JVM_OPTS -Dcassandra.max_queued_native_transport_requests=1024"Note: You will need to restart each node after making this change. This change resolved the issue for us and the Total Blocked count has been significantly reduced on each node:Note: If you still have issues you can continue to increase the queue size, the DataStax documentation suggests 3074, however I would recommend increasing the value incrementally and evaluating the impact.I hope that helps!ReferencesHigh blocked NTR count during increased workload on Cassandra node

Illustration Image

In our production Cassandra cluster (At the time of this post was DSE 5.1.18), we were seeing the Total Blocked count for the stat Native-transport-requests increasing regularly on each node. The Native-transport-request metric represents any CQL request.

Here is the view we were seeing on each node in OpsCenter:

The issue was because we were using the default value of 128 for max_queued_native_transport_requests which is set in cassandra-env.sh.

Once the limit is reached for max queued requests any new requests are dropped. Increasing the queue size would allow more space for backed up requests to queue rather than just being dropped.

The solution was to increase the queue size from 128 to 1024 by adding the following line to the end of the cassandra-env.sh file on each node:

JVM_OPTS="$JVM_OPTS -Dcassandra.max_queued_native_transport_requests=1024"

Note: You will need to restart each node after making this change.

This change resolved the issue for us and the Total Blocked count has been significantly reduced on each node:

Note: If you still have issues you can continue to increase the queue size, the DataStax documentation suggests 3074, however I would recommend increasing the value incrementally and evaluating the impact.

I hope that helps!

References

Related Articles

cluster
troubleshooting
datastax

GitHub - arodrime/Montecristo: Datastax Cluster Health Check Tooling

arodrime

4/3/2024

Checkout Planet Cassandra

Claim Your Free Planet Cassandra Contributor T-shirt!

Make your contribution and score a FREE Planet Cassandra Contributor T-Shirt! 
We value our incredible Cassandra community, and we want to express our gratitude by sending an exclusive Planet Cassandra Contributor T-Shirt you can wear with pride.

Join Our Newsletter!

Sign up below to receive email updates and see what's going on with our company

Explore Related Topics

AllKafkaSparkScyllaSStableKubernetesApiGithubGraphQl

Explore Further

cassandra