cloudflare/pingora · error · std::io::Error
dial9 worker_poll_interval must be greater than zero
Error message
dial9 worker_poll_interval must be greater than zero
What it means
build_dial9_runtime() (pingora-runtime/src/lib.rs:337) rejects worker_poll_interval == Some(Duration::ZERO): the interval at which the dial9 traced runtime polls its worker tasks must be positive if set. None (library default polling) and any positive duration pass; exactly zero is invalid.
Source
Thrown at pingora-runtime/src/lib.rs:337
return Err(Error::new(
ErrorKind::InvalidInput,
"dial9 max_file_size must be greater than zero",
));
}
if opts.max_total_size == 0 {
return Err(Error::new(
ErrorKind::InvalidInput,
"dial9 max_total_size must be greater than zero",
));
}
if opts.max_file_size > opts.max_total_size {
return Err(Error::new(
ErrorKind::InvalidInput,
"dial9 max_file_size must be less than or equal to max_total_size",
));
}
if opts.worker_poll_interval == Some(Duration::ZERO) {
return Err(Error::new(
ErrorKind::InvalidInput,
"dial9 worker_poll_interval must be greater than zero",
));
}
if let Some(parent) = opts.trace_path.parent() {
std::fs::create_dir_all(parent)?;
}
let writer = RotatingWriter::builder()
.base_path(opts.trace_path.clone())
.max_file_size(opts.max_file_size)
.max_total_size(opts.max_total_size)
.maybe_rotation_period(opts.rotation_period)
.build()?;
let mut traced = TracedRuntime::builder()
.with_trace_path(opts.trace_path.clone())View on GitHub (pinned to 0046038bd4)
Solutions
- Remove the explicit value and leave worker_poll_interval as None to use the default polling
- Or set a small positive interval, e.g. Some(Duration::from_millis(100))
- Map config values of 0 to None at your config layer instead of passing Duration::ZERO through
Example fix
// before
let opts = Dial9RuntimeOpts { worker_poll_interval: Some(Duration::ZERO), ..Default::default() };
// after
let opts = Dial9RuntimeOpts { worker_poll_interval: Some(Duration::from_millis(100)), ..Default::default() }; Defensive patterns
Strategy: validation
Validate before calling
if opts.worker_poll_interval == Some(std::time::Duration::ZERO) {
return Err(std::io::Error::new(std::io::ErrorKind::InvalidInput,
"worker_poll_interval must be None or a positive duration"));
} Prevention
- Map config values of 0 to None at your config layer; zero is not a valid interval
- Default new deployments to None (library default) unless tuning is required
- Document in your config template that the field is optional-but-positive
When it happens
Trigger: Explicitly configuring Dial9RuntimeOpts.worker_poll_interval = Some(Duration::ZERO), typically an attempt to 'disable' the poll delay or a config default of 0 that slipped through deserialization.
Common situations: Tuning observability polling from an env var that defaults to '0'; porting configs where 0 meant 'fastest'; misunderstandings that zero means 'off' when off is represented by None.
Related errors
- dial9 max_file_size must be greater than zero
- dial9 max_total_size must be greater than zero
- dial9 max_file_size must be less than or equal to max_total_
- dial9 s3 bucket must not be empty
- dial9 s3 service_name must not be empty
AI-assisted analysis of cloudflare/pingora@0046038bd4 (2026-08-16).
Data as JSON: /api/errors/a21674ddb2d91946.
Report an issue: GitHub.