0

Why do Cassandra nodes report timeouts in the logs during low traffic periods?

The system.log on nodes report ConnectTimeoutException between nodes or "socket closed" errors.

1 Answer 1

1

Background

This article discusses an issue where a firewall configured with an idle connection timeout can close connections to local nodes and nodes in other data centres during low traffic periods.

Cause

The TCP keepalive may not be appropriately configured for your environment. The default idle connection timeout is usually set to 2 hours (7200 seconds) which means keepalive probes are not sent often enough for the firewall's idle connection timeout.

Solution

To prevent connections between nodes from timing out, set the following network kernel settings:

$ sudo sysctl -w \
  net.ipv4.tcp_keepalive_time=60 \
  net.ipv4.tcp_keepalive_probes=3 \
  net.ipv4.tcp_keepalive_intvl=10

These settings will keep the connection alive by sending 3 probes every 60 seconds with a 10-second gap between each probe. Cheers!

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.