Skip to content
Latchkey

GitHub Actions github/codeql-action out of disk / OOM

CodeQL builds a database of the codebase and runs heavy analysis queries. On large repos this can exceed the runner disk or memory, causing the extractor to fail or the process to be OOM-killed.

What this error means

A codeql-action analyze (or autobuild) step fails with a disk-full error or the process is killed, often on a large monorepo.

github-actions
Error: Failed to run query: Out of memory (killed)
Error: No space left on device while creating CodeQL database

Common causes

Insufficient memory for analysis

Deep analysis on a large codebase exceeds the runner RAM and the kernel OOM-kills it.

Disk exhausted by the database

The CodeQL database plus build artifacts fill the runner disk.

How to fix it

Reduce footprint or use a larger runner

  1. Limit languages analyzed and split into multiple jobs.
  2. Free disk space before analysis or prune the build.
  3. Run analysis on a larger runner with more RAM/disk.
.github/workflows/codeql.yml
- uses: github/codeql-action/analyze@v3
  with:
    category: '/language:javascript'

How to prevent it

  • Scope CodeQL to the languages you actually ship.
  • On Latchkey managed runners you can size up to higher-memory/disk runners for CodeQL, and transient extractor failures are auto-retried rather than red-failing the scan.

Frequently asked questions

What causes ""CodeQL out of disk / killed (OOM)""?
Deep analysis on a large codebase exceeds the runner RAM and the kernel OOM-kills it.
How do I fix "CodeQL out of disk / killed (OOM)"?
Reduce footprint or use a larger runner

Related guides

References

Latchkey auto-heals failures like this one - detected, fixed, and retried without you. Start free → 30-day trial · No credit card