apache/cassandra · error · ConfigurationException
user_defined_functions_warn_timeout must less than user_defi
Error message
user_defined_functions_warn_timeout must less than user_defined_function_fail_timeout
What it means
Thrown when user_defined_functions_fail_timeout is smaller than user_defined_functions_warn_timeout in cassandra.yaml. Cassandra requires warn < fail so the warning fires before the hard failure deadline; violating that ordering is rejected during applySimpleConfig.
Source
Thrown at src/java/org/apache/cassandra/config/DatabaseDescriptor.java:1110
}
// we need this assignment for the Settings virtual table - CASSANDRA-17735
conf.counter_cache_size = new DataStorageSpec.LongMebibytesBound(counterCacheSizeInMiB);
// if set to empty/"auto" then use 5% of Heap size
indexSummaryCapacityInMiB = (conf.index_summary_capacity == null)
? Math.max(1, (int) (Runtime.getRuntime().totalMemory() * 0.05 / 1024 / 1024))
: conf.index_summary_capacity.toMebibytes();
if (indexSummaryCapacityInMiB < 0)
throw new ConfigurationException("index_summary_capacity option was set incorrectly to '"
+ conf.index_summary_capacity.toString() + "', it should be a non-negative integer.", false);
// we need this assignment for the Settings virtual table - CASSANDRA-17735
conf.index_summary_capacity = new DataStorageSpec.LongMebibytesBound(indexSummaryCapacityInMiB);
if (conf.user_defined_functions_fail_timeout.toMilliseconds() < conf.user_defined_functions_warn_timeout.toMilliseconds())
throw new ConfigurationException("user_defined_functions_warn_timeout must less than user_defined_function_fail_timeout", false);
if (!conf.allow_insecure_udfs && !conf.user_defined_functions_threads_enabled)
throw new ConfigurationException("To be able to set enable_user_defined_functions_threads: false you need to set allow_insecure_udfs: true - this is an unsafe configuration and is not recommended.");
if (conf.allow_extra_insecure_udfs)
logger.warn("Allowing java.lang.System.* access in UDFs is dangerous and not recommended. Set allow_extra_insecure_udfs: false to disable.");
if (conf.scripted_user_defined_functions_enabled)
throw new ConfigurationException("JavaScript user-defined functions were removed in CASSANDRA-18252. " +
"Hooks are planned to be introduced as part of CASSANDRA-17280");
if (conf.commitlog_segment_size.toMebibytes() == 0)
throw new ConfigurationException("commitlog_segment_size must be positive, but was "
+ conf.commitlog_segment_size.toString(), false);
else if (conf.commitlog_segment_size.toMebibytes() >= 2048)
throw new ConfigurationException("commitlog_segment_size must be smaller than 2048, but was "
+ conf.commitlog_segment_size.toString(), false);
View on GitHub (pinned to 88fd0f6a0e)
Solutions
- Ensure user_defined_functions_warn_timeout < user_defined_functions_fail_timeout in cassandra.yaml (swap or raise the fail timeout).
- Restart the node.
Example fix
# before user_defined_functions_warn_timeout: 5000ms user_defined_functions_fail_timeout: 3000ms # after user_defined_functions_warn_timeout: 2000ms user_defined_functions_fail_timeout: 5000ms
Defensive patterns
Strategy: validation
Validate before calling
long warn = parseMillis(yaml.get("user_defined_functions_warn_timeout"));
long fail = parseMillis(yaml.get("user_defined_functions_fail_timeout"));
if (warn >= fail) throw new IllegalArgumentException("udf warn_timeout must be < fail_timeout"); Try / catch
try {
DatabaseDescriptor.applySimpleConfig();
} catch (ConfigurationException e) {
if (e.getMessage().contains("user_defined_functions_warn_timeout"))
logger.error("Reorder UDF timeouts so warn < fail in cassandra.yaml");
} Prevention
- When changing one UDF timeout, always check the other
- Default warn=500ms fail=1000ms ordering
- Treat the pair as a single coupled setting in config templates
When it happens
Trigger: cassandra.yaml sets fail_timeout lower than warn_timeout, e.g. warn_timeout: 1000ms with fail_timeout: 500ms.
Common situations: Operators tightening the fail timeout after UDF hangs but forgetting to adjust the warn timeout; config templates where the two values were swapped.
Understand the failure class
Background: Conflicting config options: "cannot be used together" — configuration validation errors across open-source libraries — this error's family across 162 libraries.
- Timeouts: ETIMEDOUT, deadlines, and hung requests — what actually expires when a request times out.
Related errors
- Invalid value of auto_snapshot_ttl: ${conf.auto_snapshot_ttl
- Missing value for commitlog_sync_group_window.
- Missing value for commitlog_sync_period.
- concurrent_reads must be at least 2, but was ${conf.concurre
- concurrent_writes must be at least 2, but was ${conf.concurr
AI-assisted analysis of apache/cassandra@88fd0f6a0e (2026-09-10).
Data as JSON: /api/errors/a447bc02aecdbf83.
Report an issue: GitHub.