kopia/kopia · error
error setting limits
Error message
error setting limits
What it means
`kopia repository throttle set` computes new throttler limits and applies them with rep.Throttler().SetLimits(limits). This error wraps a failure of that call, meaning the repository refused or failed to persist the new rate limits.
Solutions
- Re-run the command to rule out a transient storage error.
- Verify repository connectivity/health (`kopia repository status`).
- Apply limits in a smaller, valid increment and confirm each accepted.
- Upgrade kopia if the failure is reproducible with valid inputs (possible persistence bug).
Defensive patterns
Strategy: retry
Validate before calling
// verify the repository is healthy and writable before changing throttler settings
if err := kopia.RepositoryStatus(ctx, cfg); err != nil {
return fmt.Errorf("repository unhealthy, refusing to set limits: %w", err)
} Try / catch
err := rep.Throttler().SetLimits(limits)
if err != nil {
// wrapped as "error setting limits"; retry transient storage failures
if isTransient(err) {
time.Sleep(retryDelay)
err = rep.Throttler().SetLimits(limits)
}
if err != nil { return fmt.Errorf("error setting limits: %w", err) }
} Prevention
- Run `kopia repository status` first; don't set limits on a degraded/read-only repository.
- Change one throttle parameter at a time to isolate invalid combinations.
- Avoid concurrent throttle set operations from multiple clients.
- Re-run the command after transient storage errors before deeper debugging.
When it happens
Trigger: Running `repository throttle set` where SetLimits fails while applying/persisting limits to the open repository — e.g. an error writing the updated throttling parameters into the repository.
Common situations: Repository in read-only or degraded state, storage errors when persisting throttler parameters, concurrent modification conflicts, or invalid combination of limit flags that passes CLI parsing but fails at the throttler layer.
Related errors
- output
- unable to change throttle
- unable to get current throttle
- unable to get current throttle
- a snapshot time is needed to use a path as source
AI-assisted analysis of kopia/kopia@82495e54b5 (2026-09-07).
Data as JSON: /api/errors/6529bd360fd88084.
Report an issue: GitHub.
Appendix: source
Thrown at cli/command_repository_throttle_set.go:37
cmd.Action(svc.directRepositoryWriteAction(c.run))
}
func (c *commandRepositoryThrottleSet) run(ctx context.Context, rep repo.DirectRepositoryWriter) error {
thr := rep.Throttler()
limits := thr.Limits()
var changeCount int
if err := c.cts.apply(ctx, &limits, &changeCount); err != nil {
return err
}
if changeCount == 0 {
log(ctx).Info("No changes made.")
return nil
}
return errors.Wrap(rep.Throttler().SetLimits(limits), "error setting limits")
}
View on GitHub (pinned to 82495e54b5)