{"record":{"id":"0dce8e7f522999ff","repo":"jdx/mise","slug":"relay-concurrency-must-be-between-1-and-32","errorCode":null,"errorMessage":"relay concurrency must be between 1 and 32","messagePattern":"relay concurrency must be between 1 and 32","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/github_relay.rs","lineNumber":101,"sourceCode":") -> Result<Option<Scope>> {\n    let Some(scope) = scope else {\n        if log_requests || no_log_requests || format.is_some() || max_duration.is_some() {\n            bail!(\"relay options require --github-relay-read-only\");\n        }\n        return Ok(None);\n    };\n    let settings = crate::config::Settings::get();\n    let settings = &settings.github_relay;\n    let format = format.unwrap_or(&settings.log_format);\n    if !matches!(format, \"text\" | \"jsonl\") {\n        bail!(\"relay log format must be text or jsonl\");\n    }\n    let timeout = duration::parse_duration(&settings.request_timeout)?;\n    if timeout.is_zero() {\n        bail!(\"relay request timeout must be greater than zero\");\n    }\n    if !(1..=32).contains(&settings.concurrency) {\n        bail!(\"relay concurrency must be between 1 and 32\");\n    }\n    let max_duration = duration::parse_duration(max_duration.unwrap_or(&settings.max_duration))?;\n    if std::time::Instant::now().checked_add(timeout).is_none()\n        || std::time::Instant::now()\n            .checked_add(max_duration)\n            .is_none()\n    {\n        bail!(\"relay duration is too large\");\n    }\n    #[cfg(not(unix))]\n    let _ = max_duration;\n    #[cfg(unix)]\n    let scope = {\n        let mut scope = scope;\n        scope.options = Options {\n            log_requests: !no_log_requests && (log_requests || settings.log_requests),\n            jsonl: format == \"jsonl\",\n            max_duration,","sourceCodeStart":83,"sourceCodeEnd":119,"githubUrl":"https://github.com/jdx/mise/blob/533346cc374382b41ec5ff70536252b2e96e725c/src/github_relay.rs#L83-L119","documentation":"configure validates settings.github_relay.concurrency against the accepted range 1..=32. Values below 1 (including 0) or above 32 bail with this error, keeping relay parallelism within a sane bounded range.","triggerScenarios":"configure runs and settings.github_relay.concurrency is 0, negative, or greater than 32 in the configuration.","commonSituations":"Setting concurrency to 0 hoping to 'disable' the relay; tuning concurrency up aggressively (e.g. 100) for large org syncs; an auto-generated config writing an out-of-range default.","solutions":["Set github_relay.concurrency to an integer between 1 and 32","Remove the concurrency override to use the default","If more parallelism is needed, pick 32 (the maximum) rather than exceeding it"],"exampleFix":"// before\n[github_relay]\nconcurrency = 64\n// after\n[github_relay]\nconcurrency = 32","handlingStrategy":"validation","validationCode":"// Check concurrency bounds before running\nlet c: i64 = settings.github_relay.concurrency;\nassert!((1..=32).contains(&c), \"concurrency must be 1..=32, got {c}\");","typeGuard":null,"tryCatchPattern":"match err {\n    RelayConfigError::ConcurrencyOutOfRange => eprintln!(\"set github_relay.concurrency between 1 and 32\"),\n    e => return Err(e),\n}","preventionTips":["Clamp user-provided concurrency to 1..=32 before writing config","Remember 0 does not disable the relay; it is invalid","Document the max (32) where users tune performance","Add unit tests covering boundary values 0, 1, 32, 33"],"tags":["github-relay","configuration","value-out-of-range"],"backgroundTag":"value-out-of-range","analyzedSha":"533346cc374382b41ec5ff70536252b2e96e725c","analyzedAt":"2026-09-17T13:35:38.149Z","contentChangedAt":"2026-09-17T13:35:38.149Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}