jdx/mise · error
relay concurrency must be between 1 and 32
Error message
relay concurrency must be between 1 and 32
What it means
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.
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
Example fix
// before [github_relay] concurrency = 64 // after [github_relay] concurrency = 32
Defensive patterns
Strategy: validation
Validate before calling
// Check concurrency bounds before running
let c: i64 = settings.github_relay.concurrency;
assert!((1..=32).contains(&c), "concurrency must be 1..=32, got {c}"); Try / catch
match err {
RelayConfigError::ConcurrencyOutOfRange => eprintln!("set github_relay.concurrency between 1 and 32"),
e => return Err(e),
} Prevention
- 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
When it happens
Trigger: configure runs and settings.github_relay.concurrency is 0, negative, or greater than 32 in the configuration.
Common situations: 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.
Understand the failure class
Background: "value must be between 0 and 1" / "out of range" / "must not be negative" errors: fixing range-validation failures across open-source libraries — this error's family across 42 libraries.
Related errors
- relay duration is too large
- relay log format must be text or jsonl
- relay request timeout must be greater than zero
- repository scope requires --github-relay-read-only
- brew-cask: command_wrapper
AI-assisted analysis of jdx/mise@533346cc37 (2026-09-17).
Data as JSON: /api/errors/0dce8e7f522999ff.
Report an issue: GitHub.
Appendix: source
Thrown at src/github_relay.rs:101
) -> Result<Option<Scope>> {
let Some(scope) = scope else {
if log_requests || no_log_requests || format.is_some() || max_duration.is_some() {
bail!("relay options require --github-relay-read-only");
}
return Ok(None);
};
let settings = crate::config::Settings::get();
let settings = &settings.github_relay;
let format = format.unwrap_or(&settings.log_format);
if !matches!(format, "text" | "jsonl") {
bail!("relay log format must be text or jsonl");
}
let timeout = duration::parse_duration(&settings.request_timeout)?;
if timeout.is_zero() {
bail!("relay request timeout must be greater than zero");
}
if !(1..=32).contains(&settings.concurrency) {
bail!("relay concurrency must be between 1 and 32");
}
let max_duration = duration::parse_duration(max_duration.unwrap_or(&settings.max_duration))?;
if std::time::Instant::now().checked_add(timeout).is_none()
|| std::time::Instant::now()
.checked_add(max_duration)
.is_none()
{
bail!("relay duration is too large");
}
#[cfg(not(unix))]
let _ = max_duration;
#[cfg(unix)]
let scope = {
let mut scope = scope;
scope.options = Options {
log_requests: !no_log_requests && (log_requests || settings.log_requests),
jsonl: format == "jsonl",
max_duration,View on GitHub (pinned to 533346cc37)