Repository navigation
Description
Checks
- I've already read https://docs.github.com/en/actions/hosting-your-own-runners/managing-self-hosted-runners-with-actions-runner-controller/troubleshooting-actions-runner-controller-errors and I'm sure my issue is not covered in the troubleshooting guide.
- I am using charts that are officially provided
Controller Version
gha-runner-scale-set-controller 0.14.2 (latest release), and master at 54147cf. Also present in gha-runner-scale-set-controller-experimental.
Deployment Method
Helm
Checks
- This isn't a question or user support case (For Q&A and community support, go to Discussions).
- I've read the Changelog before submitting this issue and I'm sure it's not due to any recently-introduced backward-incompatible changes
To Reproduce
1. Install gha-runner-scale-set-controller with `flags.runnerMaxConcurrentReconciles: 20` (and, to rule out the token-bucket limiter, `flags.workqueueRateLimiter: typed_rate_limiter`) and `metrics.controllerManagerAddr: ":8080"`.
2. Install ~50 gha-runner-scale-set releases in one go (one `AutoscalingRunnerSet` each).
3. Scrape the controller-manager metrics endpoint.
4. `controller_runtime_max_concurrent_reconciles{controller="ephemeralrunner"}` is 20, but
`{controller="autoscalinglistener"}`, `{controller="autoscalingrunnerset"}` and `{controller="ephemeralrunnerset"}` are all 1, regardless of the flag.
5. `workqueue_depth{name="autoscalinglistener"}` grows to the number of scale sets and listener Pods appear one at a time, while controller CPU stays low.Describe the bug
The controller exposes a single concurrency knob, --runner-max-concurrent-reconciles (chart value flags.runnerMaxConcurrentReconciles, default 2), but in main.go it is appended only to the options passed to EphemeralRunnerReconciler:
actions-runner-controller/main.go
Lines 340 to 347 in 54147cf
| runnerOpts := append(controllerOpts, actionsgithubcom.WithMaxConcurrentReconciles(opts.RunnerMaxConcurrentReconciles)) | |
| if err = (&actionsgithubcom.EphemeralRunnerReconciler{ | |
| Client: mgr.GetClient(), | |
| Log: log.WithName("EphemeralRunner").WithValues("version", build.Version), | |
| Scheme: mgr.GetScheme(), | |
| PublishMetrics: metricsAddr != "0", | |
| ResourceBuilder: rb, | |
| }).SetupWithManager(mgr, runnerOpts...); err != nil { |
runnerOpts := append(controllerOpts, actionsgithubcom.WithMaxConcurrentReconciles(opts.RunnerMaxConcurrentReconciles))
if err = (&actionsgithubcom.EphemeralRunnerReconciler{...}).SetupWithManager(mgr, runnerOpts...); err != nil {AutoscalingRunnerSetReconciler (L327-L335), EphemeralRunnerSetReconciler (L352-L357) and AutoscalingListenerReconciler (L362-L369) receive only controllerOpts, which carries just the rate-limiter choice (L312-L325). They therefore run with controller-runtime's default MaxConcurrentReconciles = 1.
Nothing in the reconcilers prevents higher concurrency: all three SetupWithManager methods already take opts ...Option and go through builderWithOptions (controllers/actions.github.com/options.go#L66-L77; autoscalinglistener_controller.go#L841, autoscalingrunnerset_controller.go#L854, ephemeralrunnerset_controller.go#L636). The option is simply never wired for them.
This matters in clusters that run many scale sets (for example one AutoscalingRunnerSet per team/repo, or short-lived scale sets created from CI). Each AutoscalingListener reconcile performs several API round trips (ServiceAccount, Role, RoleBinding, mirrored secret, listener Pod) and a single worker serialises all of them, so with tens of scale sets churning, listener Pod creation for a new scale set can take many minutes even though the controller is otherwise idle. --workqueue-rate-limiter=typed_rate_limiter (#4451) removes the global 10 QPS bucket but does not help here, because the limit is the single worker, not the queue rate. The in-place upgrade work in #4516 does not change this either; the wiring above is identical before and after it.
Related history: #3021 (original request, legacy controller), #3832 (added the flag for EphemeralRunner only). The flag's help text and options.go say "EphemeralRunner controller", so the current behaviour is as documented, but there is no way at all to raise concurrency for the other three reconcilers, and the chart value name (runnerMaxConcurrentReconciles) makes it easy to assume it covers the whole controller.
Describe the expected behavior
Either:
--runner-max-concurrent-reconciles(or a new general flag) also applies to theAutoscalingRunnerSet,EphemeralRunnerSetandAutoscalingListenerreconcilers, or- separate flags/values exist for them, e.g.
--listener-max-concurrent-reconcilesand--scale-set-max-concurrent-reconciles(chart:flags.listenerMaxConcurrentReconciles,flags.scaleSetMaxConcurrentReconciles), defaulting to 1 so existing behaviour is unchanged.
Option 2 seems cleaner because the three reconcilers have different write patterns (EphemeralRunnerSet in particular does status/scale updates that are more sensitive to conflicts), so operators may want to tune them independently.
Proposed fix
controllers/actions.github.com/options.go: addListenerMaxConcurrentReconciles/ScaleSetMaxConcurrentReconcilestoOptions(default 1) and toOptionsWithDefault().main.go: register the two flags next torunner-max-concurrent-reconciles(L154), and build per-reconciler option slices the same wayrunnerOptsis built at L340, passing them to the threeSetupWithManagercalls at L335, L357 and L369.charts/gha-runner-scale-set-controller/values.yaml(next to L117-L120) andtemplates/deployment.yaml(next to L70-L71): newflags.*values and{{- with }}blocks; same forcharts/gha-runner-scale-set-controller-experimental/values.yaml(L31-L32) andtemplates/_controller_template.tpl(L50-L51).- A case in
charts/gha-runner-scale-set-controller/tests/template_test.goasserting the new args are rendered.
Roughly 40-60 lines plus tests; no CRD or RBAC changes.
Additional Context
# gha-runner-scale-set-controller values used
flags:
runnerMaxConcurrentReconciles: 20
workqueueRateLimiter: typed_rate_limiter
metrics:
controllerManagerAddr: ":8080"
listenerAddr: ":8080"
listenerEndpoint: "/metrics"Controller Logs
# Startup shows the option is read, but it is only applied to the EphemeralRunner controller (see main.go references above):
INFO Using options {"runner-max-concurrent-reconciles": 20}
INFO Using typed rate limiter (per-item only, no global token bucket)
# Metrics endpoint after startup:
controller_runtime_max_concurrent_reconciles{controller="ephemeralrunner"} 20
controller_runtime_max_concurrent_reconciles{controller="ephemeralrunnerset"} 1
controller_runtime_max_concurrent_reconciles{controller="autoscalingrunnerset"} 1
controller_runtime_max_concurrent_reconciles{controller="autoscalinglistener"} 1Runner Pod Logs
N/A - the behaviour is in the controller manager's controller registration, not in runner pods.Found while operating this in production; happy to send a PR if maintainers agree with the analysis.
Activity
github-actions commentedon Sep 8, 2026
Hello! Thank you for filing an issue.
The maintainers will triage your issue shortly.
In the meantime, please take a look at the troubleshooting guide for bug reports.
If this is a feature request, please review our contribution guidelines.
Split max-concurrent-reconciles into default and per-controller flags
Add listener and scale set max-concurrent-reconciles flags
Split max-concurrent-reconciles into default and per-controller flags
Split max-concurrent-reconciles into default and per-controller flags