{"record":{"id":"85c40d9375f8a0f1","repo":"apache/cassandra","slug":"overriding-max-local-pause-time-from-ms-to","errorCode":null,"errorMessage":"Overriding {} max local pause time from {}ms to {}ms","messagePattern":"Overriding (.+?) max local pause time from (.+?)ms to (.+?)ms","errorType":"console","errorClass":null,"httpStatus":null,"severity":"info","filePath":"src/java/org/apache/cassandra/gms/FailureDetector.java","lineNumber":91,"sourceCode":" * Check the paper and the <i>IFailureDetector</i> interface for details.\n */\npublic class FailureDetector implements IFailureDetector, FailureDetectorMBean\n{\n    private static final Logger logger = LoggerFactory.getLogger(FailureDetector.class);\n    public static final String MBEAN_NAME = \"org.apache.cassandra.net:type=FailureDetector\";\n    private static final int SAMPLE_SIZE = 1000;\n    protected static final long INITIAL_VALUE_NANOS = TimeUnit.NANOSECONDS.convert(getInitialValue(), TimeUnit.MILLISECONDS);\n    private static final int DEBUG_PERCENTAGE = 80; // if the phi is larger than this percentage of the max, log a debug message\n    private static final long MAX_LOCAL_PAUSE_IN_NANOS = getMaxLocalPause();\n    private long lastInterpret = preciseTime.now();\n    private long lastPause = 0L;\n\n    private static long getMaxLocalPause()\n    {\n        long pause = MAX_LOCAL_PAUSE_IN_MS.getLong();\n\n        if (!String.valueOf(pause).equals(MAX_LOCAL_PAUSE_IN_MS.getDefaultValue()))\n            logger.warn(\"Overriding {} max local pause time from {}ms to {}ms\",\n                        MAX_LOCAL_PAUSE_IN_MS.getKey(), MAX_LOCAL_PAUSE_IN_MS.getDefaultValue(), pause);\n\n        return pause * 1000000L;\n    }\n\n    public static final IFailureDetector instance = newFailureDetector();\n    public static final Predicate<InetAddressAndPort> isEndpointAlive = instance::isAlive;\n    public static final Predicate<Replica> isReplicaAlive = r -> isEndpointAlive.test(r.endpoint());\n\n    // this is useless except to provide backwards compatibility in phi_convict_threshold,\n    // because everyone seems pretty accustomed to the default of 8, and users who have\n    // already tuned their phi_convict_threshold for their own environments won't need to\n    // change.\n    private final double PHI_FACTOR = 1.0 / Math.log(10.0); // 0.434...\n\n    private final ConcurrentHashMap<InetAddressAndPort, ArrivalWindow> arrivalSamples = new ConcurrentHashMap<>();\n    private final List<IFailureDetectionEventListener> fdEvntListeners = new CopyOnWriteArrayList<>();\n","sourceCodeStart":73,"sourceCodeEnd":109,"githubUrl":"https://github.com/apache/cassandra/blob/88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1/src/java/org/apache/cassandra/gms/FailureDetector.java#L73-L109","documentation":"FailureDetector reads the max local pause time (cassandra.max_local_pause_in_ms, default 5000) at startup. If the value differs from the built-in default, it logs a warning that the operator is overriding how long local pauses (GC/scheduler stalls) are tolerated before phrasing nodes as failed. The value is converted to nanoseconds and used for phi/pause detection.","triggerScenarios":"Setting cassandra.max_local_pause_in_ms in cassandra.yaml (or overriding the system property) to any value other than the default, then starting the node.","commonSituations":"Tuning failure detection on VMs or containers with expected long GC pauses; operators lowering or raising the pause budget without realizing the warning is informational.","solutions":["No action needed if the override is intentional — this is an informational warning confirming the custom value took effect.","To silence the warning, remove the override so the default (5000ms) is used.","Validate the chosen pause value against your JVM GC pause targets; too low causes spurious node flapping in gossip."],"exampleFix":"// before (cassandra.yaml)\ncassandra.max_local_pause_in_ms: 10000  // warns: overriding from 5000\n// after\n# remove the setting to use the default and silence the warning\n# cassandra.max_local_pause_in_ms: 5000","handlingStrategy":"validation","validationCode":"# Check whether the override is intentional before starting the node\ngrep 'cassandra.max_local_pause_in_ms' /etc/cassandra/cassandra.yaml\n# Compare with default 5000; if unset, expect no warning","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Only override max local pause time when you have measured your JVM's actual GC pause distribution.","Keep the override documented in your runbook so the warning is recognizable.","Re-evaluate the value after JVM/GC changes (e.g. G1 vs CMS, heap size changes).","Set it consistently across all nodes in the cluster to avoid divergent failure detection."],"tags":["cassandra","failure-detector","gc-pause","configuration"],"backgroundTag":"invalid-config-value","analyzedSha":"88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1","analyzedAt":"2026-09-10T07:29:22.284Z","contentChangedAt":"2026-09-10T07:29:22.284Z","schemaVersion":2},"datasetVersion":"2026-09-17T15:17:12.973Z"}