When GitHub Actions Workflows Get Stuck: Diagnosing and Resolving 'Permanently Queued' Runs

Developer troubleshooting a stuck GitHub Actions workflow.
Developer troubleshooting a stuck GitHub Actions workflow.

When GitHub Actions Workflows Get Stuck: Diagnosing and Resolving "Permanently Queued" Runs

In the fast-paced world of software development, a smooth Continuous Integration/Continuous Delivery (CI/CD) pipeline is crucial for maintaining high developer productivity. However, encountering a workflow permanently stuck in a "queued" state, refusing to cancel, can bring development to a grinding halt. This community insight delves into a specific, frustrating scenario reported by a GitHub user and provides a clear path to resolution, helping teams maintain their software engineering quality metrics.

The Frustrating Standoff: A Workflow in Limbo

A user, jrshx, reported a critical issue: a GitHub Actions workflow remained "queued" indefinitely. The run showed zero jobs created, no billable time, and its updated_at timestamp never changed. Compounding the problem, attempts to cancel—via the GitHub web interface or direct REST API calls (including /cancel and /force-cancel)—consistently returned an HTTP 500 server error. This occurred despite all typical checks passing: Repository Actions enabled, no competing runs, ubuntu-latest in use, GitHub Status operational, and active billing.

The Diagnosis: A Corrupted Run Record

Community expert hoangperry provided a vital diagnosis: this specific behavior points to a corrupted run record on GitHub’s backend. Cancellation efforts fail with an HTTP 500 because there's no live job state for the cancellation machinery to act upon. The run's internal bookkeeping never advanced, leaving it in a phantom state that user-facing APIs cannot resolve.

Before You Open a Ticket: Essential Checks

While a support ticket is the ultimate solution, hoangperry suggests a few checks, especially relevant in an ARC (Actions Runner Controller) context, to determine if the issue is isolated or part of a broader problem impacting your developer productivity dashboard:

  • Runner Availability & Label Mismatch: If your workflow uses ubuntu-latest but is configured to route to an ARC runner set, confirm that the ARC runners are correctly provisioned and that their labels match the workflow's runs-on configuration. A mismatch can cause eternal queuing. Check if other workflows are scheduling correctly; if so, it likely points to an isolated dead record.
  • Inert Record: A stuck record is typically inert, accruing zero billable time and generally not blocking new runs. The only exception is if it shares a concurrency group. If this is the case, temporarily renaming the concurrency group can unblock subsequent runs immediately.

The Solution: Engaging GitHub Support

The only reliable path to clear a corrupted run record is through GitHub Support. There is no user-side API or workaround. Here’s what to do:

  1. Open a Support Ticket: Navigate to https://support.github.com.
  2. Provide Key Details: Include the exact URL of the stuck run, its creation and stuck timestamps, and explicitly state that both /cancel and /force-cancel API endpoints return HTTP 500.
  3. Attach Request ID: Crucially, include the X-GitHub-Request-Id from one of the HTTP 500 responses. This ID allows GitHub support to directly locate the server-side error logs.
  4. Contextualize: If new runs are also queuing and experiencing similar issues, clearly state this. This elevates the priority from "clear one dead record" to "investigate scheduling," indicating a potentially larger impact on your performance goals for developers.

While GitHub's backend cleanup processes might eventually sweep some records to a "cancelled" state after a few weeks, opening a support ticket is the most reliable and immediate route to resolution.

Conclusion

Understanding GitHub Actions behavior, especially when things go awry, is key to maintaining robust CI/CD pipelines and ensuring consistent developer productivity. While frustrating, a "permanently queued" workflow with HTTP 500 cancellation errors indicates a corrupted record. Armed with the right diagnostic steps and the knowledge of how to effectively engage GitHub Support, developers can quickly resolve these blockers and get back to focusing on delivering high-quality software, thereby positively impacting their software engineering quality metrics.

Diagnosing and reporting a corrupted GitHub Actions run record.
Diagnosing and reporting a corrupted GitHub Actions run record.

|

Dashboards, alerts, and review-ready summaries built on your GitHub activity.

 Install GitHub App to Start
Dashboard with engineering activity trends