Skip to content

Build the Sphinx documentation in parallel on Read the Docs - #12726

Merged
crusaderky merged 2 commits into
dask:mainfrom
crusaderky:docs-parallel-sphinx-build
Nov 13, 2026
Merged

crusaderky merged 2 commits into
dask:mainfrom
crusaderky:docs-parallel-sphinx-build

Conversation

@crusaderky

@crusaderky crusaderky commented Nov 13, 2026 •

Copy link
Copy Markdown
Collaborator

Problem

Three consecutive Read the Docs builds were terminated by timeout after 25 minutes on 2026-11-12.
This was caused by transient slow workers exceedinig a thin margin in the build time. A successful build ends in 802s total, 679s of Sphinx);
i.e. a normal build only has a ~2x margin against the observed worst-case worker, so one slow worker is enough to lose the docs build.

Fix

Run Sphinx with -j auto via build.jobs.build.html in .readthedocs.yaml.

Measured locally (same dependency set as RTD, 32 cores):

command wall time peak RSS
sphinx-build -T -b html -d _build/doctrees -D language=en . $READTHEDOCS_OUTPUT/html (current) 490s ~600MB
same with -j 4 183s 695MB
same with -j auto 110s 701MB

Rendering the ~1100 generated API pages takes ~12 minutes of Sphinx time on a
single core, which is close enough to the Read the Docs build time limit that a
slow build worker pushes the build over it. Three consecutive builds (35846762,
35847102, 35849346) were terminated after ~25 minutes on 2026-11-12, even
though the resolved environment was identical to the last successful build and
the build recovers immediately afterwards.

`-j auto` builds one process per available CPU. Locally this takes the HTML
build from 490s to 110s with ~700MB peak RSS, so the build now has plenty of
headroom.
@github-actions

Copy link
Copy Markdown
Contributor

Unit Test Results

See test report for an extended history of previous test failures. This is useful for diagnosing flaky tests.

     25 files  ±0       25 suites  ±0   6h 28m 47s ⏱️ + 21m 5s
 19 921 tests ±0   18 488 ✅ ±0   1 433 💤 ±0  0 ❌ ±0 
379 513 runs  ±0  332 234 ✅ +8  47 279 💤  - 8  0 ❌ ±0 

Results for commit b967204. ± Comparison against base commit 6c6b72f.

@crusaderky crusaderky changed the title [unsupervised AI] Build the Sphinx documentation in parallel on Read the Docs Build the Sphinx documentation in parallel on Read the Docs Nov 13, 2026
@crusaderky
crusaderky marked this pull request as ready for review November 13, 2026 11:22
@crusaderky
crusaderky merged commit 7e7f613 into dask:main Nov 13, 2026
33 of 34 checks passed
@crusaderky
crusaderky deleted the docs-parallel-sphinx-build branch November 13, 2026 12:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant