{"record":{"id":"a21674ddb2d91946","repo":"cloudflare/pingora","slug":"dial9-worker-poll-interval-must-be-greater-than-ze","errorCode":null,"errorMessage":"dial9 worker_poll_interval must be greater than zero","messagePattern":"dial9 worker_poll_interval must be greater than zero","errorType":"validation","errorClass":"std::io::Error","httpStatus":null,"severity":"error","filePath":"pingora-runtime/src/lib.rs","lineNumber":337,"sourceCode":"        return Err(Error::new(\n            ErrorKind::InvalidInput,\n            \"dial9 max_file_size must be greater than zero\",\n        ));\n    }\n    if opts.max_total_size == 0 {\n        return Err(Error::new(\n            ErrorKind::InvalidInput,\n            \"dial9 max_total_size must be greater than zero\",\n        ));\n    }\n    if opts.max_file_size > opts.max_total_size {\n        return Err(Error::new(\n            ErrorKind::InvalidInput,\n            \"dial9 max_file_size must be less than or equal to max_total_size\",\n        ));\n    }\n    if opts.worker_poll_interval == Some(Duration::ZERO) {\n        return Err(Error::new(\n            ErrorKind::InvalidInput,\n            \"dial9 worker_poll_interval must be greater than zero\",\n        ));\n    }\n\n    if let Some(parent) = opts.trace_path.parent() {\n        std::fs::create_dir_all(parent)?;\n    }\n\n    let writer = RotatingWriter::builder()\n        .base_path(opts.trace_path.clone())\n        .max_file_size(opts.max_file_size)\n        .max_total_size(opts.max_total_size)\n        .maybe_rotation_period(opts.rotation_period)\n        .build()?;\n\n    let mut traced = TracedRuntime::builder()\n        .with_trace_path(opts.trace_path.clone())","sourceCodeStart":319,"sourceCodeEnd":355,"githubUrl":"https://github.com/cloudflare/pingora/blob/0046038bd402bc82912da862dadf9a479f31e9f1/pingora-runtime/src/lib.rs#L319-L355","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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"],"exampleFix":"// before\nlet opts = Dial9RuntimeOpts { worker_poll_interval: Some(Duration::ZERO), ..Default::default() };\n\n// after\nlet opts = Dial9RuntimeOpts { worker_poll_interval: Some(Duration::from_millis(100)), ..Default::default() };","handlingStrategy":"validation","validationCode":"if opts.worker_poll_interval == Some(std::time::Duration::ZERO) {\n    return Err(std::io::Error::new(std::io::ErrorKind::InvalidInput,\n        \"worker_poll_interval must be None or a positive duration\"));\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["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"],"tags":["rust","pingora-runtime","dial9","polling-interval","config-validation"],"backgroundTag":"invalid-config-value","analyzedSha":"0046038bd402bc82912da862dadf9a479f31e9f1","analyzedAt":"2026-08-16T21:33:22.341Z","schemaVersion":2},"datasetVersion":"2026-08-16T23:17:17.608Z"}