Skip to content

Sometimes, a job need to wait 30/60 minutes before getting a runner #3953

Closed

Description

@julien-michaud

Checks

Controller Version

0.10.1

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. Start workflows
2. The first two jobs will get a runner very quickly
3. The third one will sometimes stay pending for 30/40 minutes before getting a runner

Describe the bug

Let's say that I have a workflow with 3 jobs running in parallel.

Sometimes, the jobs 1 and 2 will get a runner right away but the third one will have to wait 30 minutes to an hour before getting a runner.

Describe the expected behavior

All the jobs should start right away.

Note that I have two runner-scale-sets with the same runnerScaleSetName name, I don't know if its a bad practice or not but its working fine 🤷‍♂

I did that to ease teh upgrade process when a new chart is available, I update the gha-runner-scale-sets one by one to avoid service interruptions.

Thanks

Additional Context

gha-runner-scale-set-controller:
  enabled: true
  flags:
    logLevel: "warn"
  podLabels:
    finops.company.net/cloud_provider: gcp
    finops.company.net/cost_center: compute
    finops.company.net/product: tools
    finops.company.net/service: actions-runner-controller
    finops.company.net/region: europe-west1
  replicaCount: 3
  podAnnotations:
    ad.datadoghq.com/manager.checks: |
      {
        "openmetrics": {
          "instances": [
            {
              "openmetrics_endpoint": "http://%%host%%:8080/metrics",
              "histogram_buckets_as_distributions": true,
              "namespace": "actions-runner-system",
              "metrics": [".*"]
            }
          ]
        }
      }
  metrics:
    controllerManagerAddr: ":8080"
    listenerAddr: ":8080"
    listenerEndpoint: "/metrics"

gha-runner-scale-set:
  enabled: true
  githubConfigUrl: https://github.com/company
  githubConfigSecret:
    github_token: <path:secret/github_token/actions_runner_controller#token>

  maxRunners: 100
  minRunners: 1

  containerMode:
    type: "dind"  ## type can be set to dind or kubernetes

  listenerTemplate:
    metadata:
      labels:
        finops.company.net/cloud_provider: gcp
        finops.company.net/cost_center: compute
        finops.company.net/product: tools
        finops.company.net/service: actions-runner-controller
        finops.company.net/region: europe-west1
      annotations:
        ad.datadoghq.com/listener.checks: |
          {
            "openmetrics": {
              "instances": [
                {
                  "openmetrics_endpoint": "http://%%host%%:8080/metrics",
                  "histogram_buckets_as_distributions": true,
                  "namespace": "actions-runner-system",
                  "max_returned_metrics": 6000,
                  "metrics": [".*"],
                  "exclude_metrics": [
                    "gha_job_startup_duration_seconds",
                    "gha_job_execution_duration_seconds"
                  ],
                  "exclude_labels": [
                    "enterprise",
                    "event_name",
                    "job_name",
                    "job_result",
                    "job_workflow_ref",
                    "organization",
                    "repository",
                    "runner_name"
                  ]
                }
              ]
            }
          }
    spec:
      containers:
      - name: listener
        securityContext:
          runAsUser: 1000
  template:
    metadata:
      labels:
        finops.company.net/cloud_provider: gcp
        finops.company.net/cost_center: compute
        finops.company.net/product: tools
        finops.company.net/service: actions-runner-controller
        finops.company.net/region: europe-west1
    spec:
      restartPolicy: OnFailure
      imagePullSecrets:
        - name: company-prod-registry
      containers:
        - name: runner
          image: eu.gcr.io/company-production/devex/gha-runners:v1.0.0-snapshot5
          command: ["/home/runner/run.sh"]

  controllerServiceAccount:
    namespace: actions-runner-system
    name: actions-runner-controller-gha-rs-controller

Controller Logs

https://gist.github.com/julien-michaud/dce55b9320fb236b622cbb00919277ce

Runner Pod Logs

/

Activity

  1. added
    bug
    gha-runner-scale-set
    needs triage
    on Feb 28, 2025
  2. changed the title [-]Sometimes, no runners are spawned[/-] [+]Sometimes, a job need to wait 30/60 minutes before getting a runner[/+] on Feb 28, 2025
  3. avadhanij commented on Apr 3, 2025

    @avadhanij

    We are seeing the same issue and we have a similar setup. We are unsure if the two runnerscalesets (for upgrade ease) is actually causing problems.

  4. emmahsax commented on Apr 4, 2025

    @emmahsax

    We are on 0.8.2, and seem to be encountering a similar issue. We recently upgraded Karpenter to 1.3.3, and that's when we began seeing this issue. But it may have been existing before that.

  5. marcusisnard commented on Apr 14, 2025

    @marcusisnard

    I’m observing similar behavior, even when not running in a high availability setup (single cluster on Azure). Unfortunately, the logs offer no insight, and the latency is unpredictable.

  6. marcusisnard commented on Apr 22, 2025

    @marcusisnard

    Our organization is experiencing job queue delays exceeding 12 hours, severely impacting production workloads. No error logs are observed on our side. What steps can we take to troubleshoot this issue? @nikola-jokic

  7. nikola-jokic commented on Apr 22, 2025

    @nikola-jokic
    Collaborator

    Hey everyone,

    Could you please submit these logs without obfuscation through the support? We cannot investigate it without understanding which workflow runs are stuck. If you have failed runners, they count as the number of runners, so we can avoid creating an indefinite number of runners if something goes wrong with the cluster.
    But if the delay is caused on the back-end side, please submit the workflow run that is stuck, and the unobfuscated log, so we can troubleshoot it. Thanks!

  8. nikola-jokic commented on Apr 22, 2025

    @nikola-jokic
    Collaborator

    Hey everyone,

    We found the root cause of the issue, and it should be fixed now. Please let us know if you are still experiencing this issue. I will leave this issue open for now for visibility. Thank you all for reporting it!

  9. marcusisnard commented on Apr 22, 2025

    @marcusisnard

    Hey everyone,

    We found the root cause of the issue, and it should be fixed now. Please let us know if you are still experiencing this issue. I will leave this issue open for now for visibility. Thank you all for reporting it!

    Do we need to uninstall and re-deploy ARC?

  10. nikola-jokic commented on Apr 22, 2025

    @nikola-jokic
    Collaborator

    No, the issue was on the back-end side, so it should start working properly without touching the ARC installation.

  11. removed
    needs triage
    on Apr 22, 2025
  12. marcusisnard commented on Apr 22, 2025

    @marcusisnard
    Image Image

    We are still seeing this issue, lots of jobs still pending, we do not have a cap on the maximum number of runners. Please let me know how I can send the appropriate logs and helm chart values used for our deployment.

  13. nikola-jokic commented on Apr 22, 2025

    @nikola-jokic
    Collaborator

    Do you have failed ephemeral runners? If you don't have failed ones, please send the listener log, the controller log and workflow URLs of the pending jobs. You can submit them in the support issue if you don't want to share them publicly.
    If you do have failed runners, please remove all failed ephemeral runner instances, which would free up the slots to scale up.

  14. 53 remaining items

  15. forgondolin commented on Jul 2, 2025

    @forgondolin

    0.12 is working better for us, the major change we've made (along with EKS autoscaler) was a better argo crds management, cause it was conflicting somehow with the listener.

  16. ajschmidt8 commented on Jul 8, 2025

    @ajschmidt8
    Contributor

    Is anyone still experiencing these issues on 0.12.1?

  17. nikola-jokic commented on Jul 8, 2025

    @nikola-jokic
    Collaborator

    Hey @ajschmidt8,

    As far as I can tell from feedback, 0.12.1 is behaving much better, and this issue has been fixed. I'm still leaving this issue around for a while to wait for potential reports, but the issue that was previously caused by a race condition during deletion of the runner has been fixed, which was the reason for the delay.

    We still need to investigate the reports where draining the node causes pod issues, but that one would also have caused issues in previous releases. Assuming that the cluster is working properly, the controller would not cause the delays anymore in 0.12.1.

  18. niodice commented on Jul 8, 2025

    @niodice

    We are upgrading from 0.11.0 to 0.12.1 tomorrow AM. I will report back after some time to report status. These issues can happen intermittently, it seems, and so it might be some time before I could confidently say that the issue is resolved.

  19. OneideLuizSchneider commented on Jul 8, 2025

    @OneideLuizSchneider

    Upgraded today to 0.12.1, will provide feedback next week.

  20. nikola-jokic commented on Jul 8, 2025

    @nikola-jokic
    Collaborator

    Hey @niodice,

    Yeah, they would occur randomly, so we do need to make sure some time has passed without experiencing these issues to confidently say this has been resolved. That is why we keep this one open, so we can monitor until we are confident that this is in fact resolved ☺️

    Please keep us updated!

  21. nikola-jokic commented on Jul 15, 2025

    @nikola-jokic
    Collaborator

    Hey @IuriGarcia,

    this looks like a network issue failing to connect, not the issue where the runner cannot connect because of incorrect credentials.

  22. IuriGarcia commented on Jul 17, 2025

    @IuriGarcia

    Hi @nikola-jokic

    Yeah, a network issue may have occurred. However, what I’m still trying to understand is why some pods get stuck in this network failure loop, while others seem to recover successfully.

    Would it make sense to open a separate issue for this?

  23. nikola-jokic commented on Jul 21, 2025

    @nikola-jokic
    Collaborator

    Hey @IuriGarcia,

    Network failures are cluster-specific, which means that it is unlikely to be an ARC issue. You should look into what is going on, and if you are confident that the ARC is causing the issue, please report it. But ARC is only responsible for creating a runner pod and reacting to the events associated with it. It doesn't control even most of the specs. ARC has a tiny bit of logic related to the runner container in the runner pod, and that is it.

  24. nikola-jokic commented on Jul 21, 2025

    @nikola-jokic
    Collaborator

    Hey @niodice, @OneideLuizSchneider

    Any news? This one might be safe to close now.

  25. niodice commented on Jul 21, 2025

    @niodice

    @nikola-jokic things have been quite smooth on our end. No issues to report from me 👍

  26. OneideLuizSchneider commented on Jul 22, 2025

    @OneideLuizSchneider

    @nikola-jokic
    no issues anymore, it seems to be stable now. Thanks for your help!

  27. nikola-jokic commented on Jul 22, 2025

    @nikola-jokic
    Collaborator

    Closing this one now. Thank you, everyone, for your valuable feedback!

  28. denysvitali-kaiko commented on Dec 9, 2025

    @denysvitali-kaiko

    @nikola-jokic This seems to still happen to us, despite we're using the latest ARC version.

    Can you check runs/20069831057/job/57568468148? Looks very odd that this happens randomly.
    The logs from the listener look like GH's backend is not relying the message...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    buggha-runner-scale-set

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions