quickwit-oss/quickwit · error
`grpc.max_connection_age_grace` requires…
Error message
`grpc.max_connection_age_grace` requires `grpc.max_connection_age` to be set
What it means
The gRPC server config validation requires that `max_connection_age_grace` is only set together with `max_connection_age`: a grace period only makes sense as an extension of a connection's max age. Setting grace without age leaves the setting meaningless, so `GrpcConfig::validate` fails with this message.
Solutions
- Add `grpc.max_connection_age` alongside `max_connection_age_grace`
- Remove `grpc.max_connection_age_grace` if you don't want connection aging at all
- Review the gRPC config section so both values are configured together
Example fix
// before grpc: max_connection_age_grace: 30s // after grpc: max_connection_age: 60s max_connection_age_grace: 30s
Defensive patterns
Strategy: validation
Validate before calling
fn validate_grpc_age_pair(cfg: &GrpcConfig) -> anyhow::Result<()> {
if cfg.max_connection_age_grace.is_some() && cfg.max_connection_age.is_none() {
anyhow::bail!("grpc.max_connection_age_grace requires grpc.max_connection_age");
}
Ok(())
} Try / catch
if let Err(e) = node_config.validate() {
if e.to_string().contains("max_connection_age_grace") {
eprintln!("Set both grpc.max_connection_age and max_connection_age_grace, or drop the grace value.");
}
} Prevention
- Always configure connection age and grace as a pair
- Comment out both lines together when disabling connection recycling
- Diff your gRPC config against the reference example before deploying
When it happens
Trigger: Setting `grpc.max_connection_age_grace` in the node config while leaving `grpc.max_connection_age` unset, then loading/validating the node config.
Common situations: Tuning gRPC connection recycling and only partially copying example settings; a config template where the age line was commented out but the grace line remained.
Understand the failure class
Background: "is required", "must be set", "missing required field": configuration validation errors across open-source libraries — this error's family across 36 libraries.
Related errors
- max gRPC message size (`grpc.max_message_size`) must be at…
- `rest.max_connection_age_grace` requires…
- concatenate field uses an unknown field
- contains an empty label name
- contains an empty label value
AI-assisted analysis of quickwit-oss/quickwit@a39730c5cd (2026-09-08).
Data as JSON: /api/errors/16e7f9b437c317a1.
Report an issue: GitHub.
Appendix: source
Thrown at quickwit/quickwit-config/src/node_config/mod.rs:138
#[serde(default = "default_keep_alive_timeout")]
pub timeout: HumanDuration,
}
impl GrpcConfig {
fn default_max_message_size() -> ByteSize {
ByteSize::mib(20)
}
pub fn validate(&self) -> anyhow::Result<()> {
ensure!(
self.max_message_size >= ByteSize::mb(1),
"max gRPC message size (`grpc.max_message_size`) must be at least 1MB, got `{}`",
self.max_message_size
);
if let Some(tls_config) = &self.tls_config {
tls_config.validate()?;
}
ensure!(
!(self.max_connection_age_grace.is_some() && self.max_connection_age.is_none()),
"`grpc.max_connection_age_grace` requires `grpc.max_connection_age` to be set"
);
Ok(())
}
}
impl Default for GrpcConfig {
fn default() -> Self {
Self {
max_message_size: Self::default_max_message_size(),
tls_config: None,
keep_alive: None,
max_connection_age: None,
max_connection_age_grace: None,
}
}
}View on GitHub (pinned to a39730c5cd)