A potential fix for OOM errors which result in the entire extraction failing - #371
Open
AngledLuffa wants to merge 4 commits into
Open
A potential fix for OOM errors which result in the entire extraction failing#371AngledLuffa wants to merge 4 commits into
AngledLuffa wants to merge 4 commits into
Conversation
AngledLuffa
force-pushed
the
instrument
branch
3 times, most recently
from
July 28, 2026 21:19
6a3dee2 to
8a0fef6
Compare
… a multiprocessing Value. The launcher process now refuses to get too far ahead while a slow page is processing, since if it does, the reduce process would be collecting all the finished smaller pages and eventually OOM. Once the reduce process OOMs, of course, the entire extraction appears 'stuck' and never recovers.
…by the main launcher process restarting the workers as they go missing. The goal here is to make it so workers don't all use too much memory by having each worker gather all the templates over time, resulting in them eventually adding up to more memory than the system has (since each one is technically a subprocess). Once the system memory is exhausted, the system would kill a worker, resulting in its document never getting finished and the entire extraction being stuck at that lost document.
…oducer can submit more work to the map/reduce workers
…run to completion on EN wiki without adding too much extra time from restarting processes every once in a while
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.
See #369
The changes are:
This controls for a couple possible cases where an entire extraction fails on account of one job using up too much memory and receiving SIGKILL from the OS