Skip to content

preview/quarto-publish: large Quarto site renders crash Deno's default 8 GB V8 heap #262

Description

@d-morrison

Symptom

build / build (the preview capability's render job) fails with exit code 133 on d-morrison/rme PRs #1040 and #1042:

# Fatal JavaScript out of memory: Ineffective mark-compacts near heap limit
/usr/local/bin/quarto: line 210: 7515 Trace/breakpoint trap (core dumped) "${QUARTO_DENO}" ...
##[error]Process completed with exit code 133.

The crash is deterministic (reproduced on re-run: rme runs 29545626458 attempts 1 and 2, 29545931184) and happens late in the ~37-file site render — after all or nearly all chapters have rendered — when Deno's cumulative V8 heap hits ~8046 MB.

Diagnosis

  • Quarto's launcher (v1.9.38) hardcodes --max-old-space-size=8192,--max-heap-size=8192 as V8 defaults, but prepends them before any user-supplied $QUARTO_DENO_V8_OPTIONS in a single --v8-flags= argument. V8 parses flags left to right, so a user-supplied value wins — QUARTO_DENO_V8_OPTIONS is the supported override hook.
  • Not a Quarto version change: latest stable has been v1.9.38 since May 25, and green builds hours earlier used the same binary. The rme site simply grew past the cap (the failing PRs add a rewritten ~400-line chapter summary transcluded into two chapters, plus a new chapter from a chapter split).
  • Standard ubuntu-latest runners have 16 GB RAM, so the 8 GB V8 cap — not physical memory — is the binding constraint.

Proposed fix

Set QUARTO_DENO_V8_OPTIONS: --max-old-space-size=12288,--max-heap-size=12288 on the render steps in preview/action.yml, and the render step in quarto-publish/action.yml (the main-branch publish renders the same site, so it will hit the same wall as soon as the growing site merges).

Local validation on a 16 GB / 4-core container mirroring the runner is in progress (reproduce with default cap, then confirm the raised cap passes).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions