Add options for max diffs before restarting process #202
Labels
enhancement
New feature or request
server
Specific to the diffing server, rather than diff algorithms
Folks at Internet Archive would like to see an option to limit the number of requests/diffs that can be handled by a single child process of the diff server (once we hit that limit, we should kill that process and start a new one). The idea is to have something similar to Gunicorn’s
max_requests
and maybemax_requests_jitter
.The server currently runs all diffs via a
ProcessPoolExecutor
:web-monitoring-diff/web_monitoring_diff/server/server.py
Lines 542 to 560 in 1753d43
ProcessPoolExecutor
has amax_tasks_per_child
option that basically does this, so we might be able to just lean on that. Doing so doesn’t give us a way to do jitter, but that might be fine.Most of our config options come in via environment variables, so we should probably use env vars for this, too.
The text was updated successfully, but these errors were encountered: