Skip to content

A queued job got no runner for 15 minutes in a 131-job burst; one job retry does not cover it #30

Closed

Description

@ruehowl

What happened

The run was sourceplane/orun-cloud's full verify for sourceplane/orun-cloud#1910 (GitHub run 38720310195). It was the first full verify on the m7a/m8a fleet (#29) and had 131 jobs.

  • 127 nimbus jobs started within about 3 minutes of being queued. Peak busy was 96 runners at 10:29:30 UTC, under the cap of 100.
  • openproduct-db · dev · Verify was queued at 10:27:38 and started at 10:42:44, after 15 minutes with no runner.
    • The runner it got, nimbus-i-009eaee82ccb1bb26, was launched for a later run's burst (run 38721983143, queued from 10:41:21). GitHub hands an idle org runner the oldest matching queued job.
    • That later run's baselines-registry · stage · Sync was then left queued in turn.
  • So the fleet launched no runner for that job until something else did, and nothing re-checked it in between.

Why it can stay stranded

job_retry is { enable = true, delay_in_seconds = 120, max_attempts = 1 }. A job gets one re-check, 120 s after its first scale-up pass. If that pass also creates nothing for it, nothing looks at the job again: no runner, a full cap, a launch error, or a runner that went to another job. In module 7.11.0 (scale-up.ts), a message skipped at the cap goes back to SQS as a batch failure. A launch error that is not retryable, though, only gets publishRetryMessage, and that runs once.

The cause of the first miss needs the scale-up lambda's log, not reachable from here. It is either a CreateFleet error on the two-type pool or a runner taken by another job. Please check it privately; don't paste raw log lines here, since the repository is public. Either way the safety net is one attempt deep.

Suggested fix

Raise job_retry.max_attempts to 3. The module backs off by delay_backoff (default 2), so the re-checks fall at about +120 s, +240 s and +480 s (about 14 minutes of cover), all capped at 900 s.

  • Each re-check first asks GitHub whether the job is still queued, so a job that found a runner costs one API call.
  • The first delay stays at 120 s, so the boot-time reasoning in runners.tf still holds.
  • A duplicate runner (when the original was merely slow to boot) idles and is reaped after minimum_running_time_in_minutes (3). That is about $0.002 per occurrence on m7a spot.

Also worth a look: instance_types now holds two types. A fleet-wide InsufficientInstanceCapacity fails over to on-demand, but other per-pool errors don't. Adding m7i.large back as a third, more expensive pool would give price-capacity-optimized somewhere to go. It ran orun-cloud jobs 1.08× as long as m7a (sourceplane/orun-cloud#1908).

Activity

  1. ruehowl commented on Oct 15, 2026

    @ruehowl
    ContributorAuthor

    Correction to the analysis above, from the next verify (sourceplane/orun-cloud#1912, run 38724417216).


    Generated by Claude Code

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions