·4 min read

Actions: job was not started, payments failed

Every scheduled GitHub Actions run failed for 12 days with one billing message and no log. Here is how we found it, and why a second failure hid behind it.

cigithub-actionsdeploydebugging

Contents

Our site stopped deploying and nobody noticed for 12 days. Every scheduled GitHub Actions workflow failed on the same line, and not one job had started. This post shows where that line hides, what it cost us, and why we thought for a while that the cause was something else.

What we saw

We asked a simple question: what did the pipelines do on their last runs? The live site answered first. Its version.json still showed the build from November 10. Everything we had scheduled after that day was missing, including posts queued for publication.

The runs were all red. But opening one gave us no log, because there was nothing to log. The only text was an annotation on the run:

The job was not started because recent account payments have failed
or your spending limit needs to be increased. Please check the
'Billing & plans' section in your settings

You can read the same text from the terminal with gh run view <run-id>. It appears for every job in every workflow, which is the clue. A bug in one workflow does not fail all of them at once, in the same way, before any step runs.

Why nobody noticed

A failed scheduled run has no one waiting on it. Nobody pushed a commit and stared at a red cross. The jobs just did not happen, day after day.

Scheduled jobs are the worst case for this. A push that fails is seen within minutes. A cron job that fails is seen when its output is missed, and some of ours had no output anyone checked daily.

The second failure

This is where we lost time. One job, the LinkedIn announcement, had started failing earlier, with a different and real error:

token is expired — nothing can be posted until it is replaced.

That token has a 60 day life, and it had run out on November 10. So the logs from before the billing problem showed an expired token, and it was easy to read that as the whole story. It was only part of it. Two causes were stacked: one that stopped a single job from posting, and one that stopped every job from starting.

A useful rule from this: when you find a cause, check whether it explains every symptom. The expired token could not explain a deploy job that never ran, because the deploy job does not use that token.

What it cost

  • The site stayed on the November 10 build for 12 days.
  • Scheduled posts stayed unpublished, because publishing is a daily build.
  • Our daily Search Console snapshot did not run. Those 12 days of data cannot be fetched again, because the job stores what Search Console reports that day.

The deploy delay can be undone. The missing data cannot, and that is the part that stings.

What we did

We did not get the billing state fixed inside that session. Settling a payment is a human task in a settings page. What we could do was stop depending on it. We moved the seven workflows to another CI service and removed the .github/workflows folder, so two pipelines could not both try to deploy. Our notes on that move are in a later post.

If you hit the same message, the order we would use is:

  1. Open one failed run and read its annotation, not the job log. The log is empty.
  2. Open Billing and plans in your account settings and look for a failed payment or a spending limit of zero.
  3. Remember that Actions minutes on private repos are billed against your plan.
  4. Fix the payment or raise the limit, then re-run one workflow by hand with gh workflow run <name> to confirm jobs start.
  5. Check every other scheduled job for a second, unrelated failure. Ours had one.

Catching it sooner

The lesson we took is that a missing run needs an alarm as much as a failed run does. A red job tells you something. A job that never starts tells you nothing, so you have to look for the absence.

The cheapest check we found is to read the live site for its own build date. Ours publishes version.json, and a comparison of its date with today takes one line. If the gap is more than a day or two, something upstream has stopped, and it does not matter yet which part.

We also now treat "every job failed the same way" as a different class of problem from "one job failed". The first points at the account, the runner or billing. The second points at the code. Looking at the pattern before the log would have saved us most of a morning.

Short version

  • The message The job was not started because recent account payments have failed means billing, not your workflow files.
  • There is no job log for it. Read the run annotation.
  • All workflows fail together, and no step runs.
  • Look for a second cause before you stop. We had an expired token on top.
  • Watch for absence: compare your live site's build date with today.

More posts

New writing when there is something worth saying. By email or by RSS, whichever you prefer.