{"record":{"id":"f71c94d9578f3af4","repo":"quickwit-oss/quickwit","slug":"tls-cert-poll-interval-must-be-greater-than-zero","errorCode":null,"errorMessage":"`tls.cert_poll_interval` must be greater than zero, got `{}`","messagePattern":"`tls\\.cert_poll_interval` must be greater than zero, got `(.+?)`","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"quickwit/quickwit-config/src/node_config/mod.rs","lineNumber":179,"sourceCode":"    pub cert_path: String,\n    pub key_path: String,\n    // Path to a PEM file holding the trusted CA certificate(s). Multiple CA certificates may be\n    // concatenated in the same file: all of them are trusted.\n    #[serde(default)]\n    pub ca_path: String,\n    #[serde(default)]\n    pub expected_name: Option<String>,\n    #[serde(default, alias = \"validate_client\")]\n    pub verify_client_cert: bool,\n    // How often the certificate and key files are polled for changes and hot-reloaded (e.g.\n    // `\"5m\"`). An immediate reload can also be triggered out-of-band with `SIGHUP`.\n    #[serde(alias = \"cert_reload_interval\", default = \"default_cert_poll_interval\")]\n    pub cert_poll_interval: HumanDuration,\n}\n\nimpl TlsConfig {\n    pub fn validate(&self) -> anyhow::Result<()> {\n        ensure!(\n            !self.cert_poll_interval.is_zero(),\n            \"`tls.cert_poll_interval` must be greater than zero, got `{}`\",\n            self.cert_poll_interval\n        );\n        Ok(())\n    }\n}\n\nfn default_cert_poll_interval() -> HumanDuration {\n    HumanDuration::try_from(\"5m\".to_string()).expect(\"`5m`should be a valid human duration\")\n}\n\n#[derive(Clone, Debug, Eq, PartialEq, Serialize, Deserialize)]\n#[serde(deny_unknown_fields)]\npub struct IndexerConfig {\n    #[serde(default = \"IndexerConfig::default_split_store_max_num_bytes\")]\n    pub split_store_max_num_bytes: ByteSize,\n    #[serde(default = \"IndexerConfig::default_split_store_max_num_splits\")]","sourceCodeStart":161,"sourceCodeEnd":197,"githubUrl":"https://github.com/quickwit-oss/quickwit/blob/a39730c5cdcd1a4fe798403737ae293999ea21f8/quickwit/quickwit-config/src/node_config/mod.rs#L161-L197","documentation":"TlsConfig::validate requires `cert_poll_interval` to be strictly greater than zero. This interval controls how often Quickwit polls the TLS certificate files for reload; a zero interval is meaningless (either never fires or busy-loops) and is rejected.","triggerScenarios":"Setting `tls.cert_poll_interval: 0s` (or `0ms`/`0` with a zero-valued HumanDuration) in a gRPC TLS config block, then validating node config at startup. Note the field also accepts the alias `cert_reload_interval`.","commonSituations":"Trying to 'disable' certificate polling by setting the interval to zero instead of removing the polling config; YAML value parsed as 0 due to unit omission; copy-pasted template with a zero placeholder.","solutions":["Set `cert_poll_interval` to a positive duration, e.g. `1m` or `10m`.","To effectively disable polling, remove the TLS cert-poll configuration rather than setting zero, or use a very large interval like `24h`.","Check that the YAML value includes a unit — a bare `0` with implicit zero duration triggers this too.","Remember the alias `cert_reload_interval` may be the key actually set in your file."],"exampleFix":"# before\ntls:\n  cert_poll_interval: 0s\n# after\ntls:\n  cert_poll_interval: 1m","handlingStrategy":"validation","validationCode":"const isPositiveDuration = (d) => d !== undefined && d !== null && parseDuration(d) > 0;\nif (!isPositiveDuration(cfg.grpc?.tls?.cert_poll_interval ?? '60s')) {\n  throw new Error('cert_poll_interval must be > 0');\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always include explicit units for durations (1m, 30s); a bare 0 is invalid.","To stop cert polling, remove the config rather than setting the interval to zero.","Remember the key alias cert_reload_interval — check both spellings in your config.","Use long intervals (1h, 24h) rather than zero to minimize polling overhead."],"tags":["config","tls","validation","duration"],"backgroundTag":"value-out-of-range","analyzedSha":"a39730c5cdcd1a4fe798403737ae293999ea21f8","analyzedAt":"2026-09-08T13:19:37.784Z","contentChangedAt":"2026-09-08T13:19:37.784Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}