Page MenuHomePhabricator

Huge memory usage when using archivebot with -async option
Closed, ResolvedPublicBUG REPORT

Description

Steps to replicate the issue:

pwb -simulate archivebot -lang:en -async

What happens?:
The memory usage increases a lot. Probably a MemoryError could occurr when running for the whole wiki.

The reason is the internal queue of ThreadPoolExecutor which is an unlimited SimpleQueue (or unlimited Queue for < Python 3.7). This queue holds all pending tasks references to the archive template retrieved from generator.

What should have happened instead?:
The memory usage should not be exhausing.

Software version:
Pywikibot 8.1.0dev3

Details

Related Changes in Gerrit:

Event Timeline

Xqt triaged this task as Medium priority.Apr 1 2023, 8:44 AM
Xqt renamed this task from Huge memory usage when using archivebot with -async optin to Huge memory usage when using archivebot with -async option.Apr 2 2023, 7:57 AM

Change #1105000 had a related patch set uploaded (by Xqt; author: Xqt):

[pywikibot/core@master] IMPR: Add BoundedThreadPoolExecutor

https://gerrit.wikimedia.org/r/1105000

Change #1105000 merged by jenkins-bot:

[pywikibot/core@master] IMPR: Add BoundedPoolExecutor

https://gerrit.wikimedia.org/r/1105000