Skip to content

AxonOps — AI-Native Control Plane for Open Source Data Platforms

nodetool gettimeout

Displays the timeout value for the specified type.


Terminal window
nodetool [connection_options] gettimeout <timeout_type>

See connection options for connection options.

nodetool gettimeout retrieves the current timeout value for a specific operation type. Timeouts control how long Cassandra waits for various operations before failing with a timeout exception.

Understanding current timeout settings is essential for:

  • Troubleshooting timeout errors - Verify current settings
  • Performance tuning - Assess if timeouts match workload requirements
  • Configuration validation - Confirm runtime matches expected values

ArgumentDescription
timeout_typeThe type of timeout to query
TypeDescription
readTimeout for read operations
writeTimeout for write operations
rangeTimeout for range read operations
counterwriteTimeout for counter write operations
cascontentionTimeout for CAS (Compare-and-Set) contention retries
truncateTimeout for truncate operations
miscTimeout for miscellaneous operations
internodeconnectTimeout for internode connections
internodeuserTimeout for internode user operations
internodestreaminguserTimeout for internode streaming operations

Terminal window
nodetool gettimeout read

Output:

Current timeout for type read: 5000 ms
Terminal window
nodetool gettimeout write
Terminal window
# Check all timeout types
for type in read write range counterwrite cascontention truncate misc; do
echo -n "$type: "
nodetool gettimeout $type
done

Timeout TypeDefaultDescription
read5000 msSingle partition reads
write2000 msWrites and mutations
range10000 msRange scans and token range reads
counterwrite5000 msCounter mutations
cascontention1000 msLWT contention retries
truncate60000 msTable truncation

When seeing ReadTimeoutException or WriteTimeoutException:

Terminal window
# Check current read timeout
nodetool gettimeout read
# If timeouts are appropriate, issue is likely performance-related
# If timeouts are too low, consider increasing
# Check write timeout
nodetool gettimeout write

Confirm runtime matches cassandra.yaml:

verify_timeouts.sh
#!/bin/bash
echo "=== Timeout Configuration Verification ==="
echo ""
echo "Runtime values:"
for type in read write range counterwrite; do
nodetool gettimeout $type
done
echo ""
echo "cassandra.yaml values:"
grep -E "read_request_timeout|write_request_timeout|range_request_timeout|counter_write_request_timeout" /etc/cassandra/cassandra.yaml

Understand timeout settings for capacity planning:

timeout_analysis.sh
#!/bin/bash
echo "=== Timeout Analysis ==="
echo ""
read_timeout=$(nodetool gettimeout read 2>/dev/null | grep -oE "[0-9]+" | head -1)
write_timeout=$(nodetool gettimeout write 2>/dev/null | grep -oE "[0-9]+" | head -1)
range_timeout=$(nodetool gettimeout range 2>/dev/null | grep -oE "[0-9]+" | head -1)
echo "Current Timeouts:"
echo " Read: ${read_timeout}ms"
echo " Write: ${write_timeout}ms"
echo " Range: ${range_timeout}ms"
echo ""
echo "Recommendations:"
if [ "$read_timeout" -lt 5000 ]; then
echo " - Read timeout below default (5000ms)"
fi
if [ "$write_timeout" -lt 2000 ]; then
echo " - Write timeout below default (2000ms)"
fi

check_timeouts_cluster.sh
#!/bin/bash
TIMEOUT_TYPE="${1:-read}"
echo "=== Cluster Timeout Check: $TIMEOUT_TYPE ==="
echo ""
# Get list of node IPs from local nodetool status
nodes=$(nodetool status | grep "^UN" | awk '{print $2}')
for node in $nodes; do
echo -n "$node: "
ssh "$node" "nodetool gettimeout $TIMEOUT_TYPE" 2>/dev/null || echo "FAILED"
done
verify_timeout_consistency.sh
#!/bin/bash
echo "=== Timeout Consistency Check ==="
echo ""
# Get list of node IPs from local nodetool status
nodes=$(nodetool status | grep "^UN" | awk '{print $2}')
for type in read write range counterwrite; do
echo "Checking $type timeout:"
values=""
for node in $nodes; do
value=$(ssh "$node" "nodetool gettimeout $type" 2>/dev/null | grep -oE "[0-9]+" | head -1)
echo " $node: ${value}ms"
values="$values $value"
done
unique=$(echo $values | tr ' ' '\n' | sort -u | grep -v "^$" | wc -l)
if [ "$unique" -gt 1 ]; then
echo " WARNING: Inconsistent values across cluster!"
else
echo " OK: Consistent across cluster"
fi
echo ""
done

#!/bin/bash
# Export timeouts as metrics
for type in read write range counterwrite cascontention; do
value=$(nodetool gettimeout $type 2>/dev/null | grep -oE "[0-9]+" | head -1)
if [ -n "$value" ]; then
echo "cassandra_timeout_${type}_ms $value"
fi
done
#!/bin/bash
# Output timeouts as JSON
echo "{"
echo " \"timestamp\": \"$(date -Iseconds)\","
echo " \"timeouts\": {"
first=true
for type in read write range counterwrite cascontention truncate; do
value=$(nodetool gettimeout $type 2>/dev/null | grep -oE "[0-9]+" | head -1)
if [ -n "$value" ]; then
if [ "$first" = true ]; then
first=false
else
echo ","
fi
echo -n " \"$type\": $value"
fi
done
echo ""
echo " }"
echo "}"

Terminal window
# Check JMX connectivity
nodetool info
# Verify timeout type is valid
nodetool gettimeout read # Known valid type
Terminal window
# If you see "unknown timeout type" error
# Use one of: read, write, range, counterwrite, cascontention, truncate, misc
Terminal window
# If value differs from cassandra.yaml
# Runtime may have been changed with settimeout
# Or JVM parameters may override
# Check for JVM overrides
ps aux | grep cassandra | grep timeout

Timeout Management

  1. Document current values - Record timeouts as part of configuration management
  2. Cluster consistency - Ensure all nodes have the same timeouts
  3. Monitor timeout errors - Correlate errors with timeout settings
  4. Adjust carefully - Increasing timeouts masks performance issues
  5. Consider workload - Range queries often need longer timeouts

Timeout Tuning Guidance

  • Read timeout: Increase for slow storage or complex queries
  • Write timeout: Rarely needs increasing; investigate if writes timeout
  • Range timeout: May need increasing for large scans
  • Counter timeout: Important for counter-heavy workloads
  • CAS contention: Affects LWT operations under contention

CommandRelationship
settimeoutModify timeout values
infoGeneral node information
proxyhistogramsView latency distributions