actions-runner-controller: Scaleset controllers stuck every night with a "RunnerScaleSetSessionConflictException: there is already an active session"
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
0.9.3
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
- Deploy ARC and ScaleSet
- Have very frequent workflows scheduled
- observe the scaleset controller with the exception after some random time
Describe the bug
Hi, since February 9th, we observe on a daily basis the following logs in our scale set controllers:
2025/02/11 07:37:41 Application returned an error: createSession failed: failed to create session: actions error: StatusCode 409, AcivityId "....": GitHub.Actions.Runtime.WebApi.RunnerScaleSetSessionConflictException, GitHub.Actions.Runtime │ │ .WebApi: The actions runner scaleset gha-standard-scale-set already has an active session.
This occurs not for all scale sets, but for those that are rather frequently used (e.g. translation jobs that run every 3 minutes). It has a major impact as a lot of jobs queue up and all development teams are stuck then. But it worked for months like a charm, this is whats the surprising thing about it.
Does anyone have the same problem?
Describe the expected behavior
- The Scaleset controller should just continue to work (or retry to get a session)
Additional Context
-
Controller Logs
2025/02/11 07:37:41 Application returned an error: createSession failed: failed to create session: actions error: StatusCode 409, AcivityId "....": GitHub.Actions.Runtime.WebApi.RunnerScaleSetSessionConflictException, GitHub.Actions.Runtime │
│ .WebApi: The actions runner scaleset gha-standard-scale-set already has an active session.
Runner Pod Logs
(no runners launched)
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 12
- Comments: 17 (1 by maintainers)
🙏 that rollback works… this issue has caused serious disruption & stress for a large team of engineers for 4 days… maybe Jenkins wasn’t so bad after all
Hello @nikola-jokic we’re starting to see the same errors that were occurring as last time? Do you know if the same change/change like the one that broke self hosted runners has been made again?
Hey @tomhaynes,
You are right; the issue was on the API side. Using ARC or any self-hosted runner solution for critical workloads is perfectly fine. The point I think @matteovivona raised is that you should probably have a fallback mechanism in case an issue like this occurs, so it doesn’t cause disruptions.
Hey @mmuth @tomhaynes, we added an alert to help us catch this kind of issue in the future, and the fix is rolled out.
Also, thank you, @matteovivona, for your support!
Closing this issue now since it seems to be resolved. We can always re-open it.
Hey everyone,
We rolled out changes to our API for stricter session validation that resulted in some unexpected conflict exceptions. We’ve rolled those changes back now. The listener should restart on its own, so the scale set should recover without any manual intervention. If not, please let me know, since the listener should recover from situations like this.
Same issue in the past two days @Link- @nikola-jokic do you folks know about any changes in api? or what could be the problem?
Sorry missed this @nikola-jokic, you’ve been helping my colleague on this issue - https://github.com/actions/actions-runner-controller/issues/3935 - thanks
i have same issue !!! in the past 2 days i find me sleaf with that issue !
ghcr.io/actions/gha-runner-scale-set-controller:0.8.1