Skip to content

A potential fix for OOM errors which result in the entire extraction failing - #371

Open
AngledLuffa wants to merge 4 commits into
WikiExtractor:masterfrom
AngledLuffa:instrument
Open

A potential fix for OOM errors which result in the entire extraction failing#371
AngledLuffa wants to merge 4 commits into
WikiExtractor:masterfrom
AngledLuffa:instrument

Conversation

@AngledLuffa

Copy link
Copy Markdown
Collaborator

See #369

The changes are:

  • limit the number of jobs queued by the job launching process
  • have worker processes exit on their own every 500 documents

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

@AngledLuffa
AngledLuffa force-pushed the instrument branch 3 times, most recently from 6a3dee2 to 8a0fef6 Compare July 28, 2026 21:19
… 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
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