Repository navigation
Build the Sphinx documentation in parallel on Read the Docs - #12726
Merged
Merged
Conversation
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.
Contributor
Unit Test ResultsSee 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 Results for commit b967204. ± Comparison against base commit 6c6b72f. |
crusaderky
marked this pull request as ready for review
November 13, 2026 11:22
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 autoviabuild.jobs.build.htmlin.readthedocs.yaml.Measured locally (same dependency set as RTD, 32 cores):
sphinx-build -T -b html -d _build/doctrees -D language=en . $READTHEDOCS_OUTPUT/html(current)-j 4-j auto