Skip to content

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

Open
AngledLuffa wants to merge 1 commit into
WikiExtractor:masterfrom
AngledLuffa:instrument
Open

A potential fix for OOM errors which result in the entire extraction failing#371
AngledLuffa wants to merge 1 commit 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 6 times, most recently from fcda98e to 89622c8 Compare August 3, 2026 16:30
@AngledLuffa
AngledLuffa force-pushed the instrument branch 2 times, most recently from 6d1c468 to c80d2f1 Compare August 4, 2026 22:51
…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.

Set the default for --max_tasks_per_worker to 500, since that should 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