← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] ~cjwatson/launchpad:buildmaster-process-max-idle into launchpad:master

 

Colin Watson has proposed merging ~cjwatson/launchpad:buildmaster-process-max-idle into launchpad:master.

Commit message:
Bump buildd-manager process pool maxIdle to 5m

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~cjwatson/launchpad/+git/launchpad/+merge/386830

ampoule defaults to stopping child processes after they've been idle for 20 seconds, which is a bit eager since that's close to our scan interval of 15 seconds, so processes get stopped and started a lot.  Bump it somewhat arbitrarily to five minutes.
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of ~cjwatson/launchpad:buildmaster-process-max-idle into launchpad:master.
diff --git a/lib/lp/buildmaster/interactor.py b/lib/lp/buildmaster/interactor.py
index 6d4ee49..03283d5 100644
--- a/lib/lp/buildmaster/interactor.py
+++ b/lib/lp/buildmaster/interactor.py
@@ -168,6 +168,13 @@ def make_download_process_pool(**kwargs):
     starter.connectorFactory = QuietAMPConnector
     kwargs = dict(kwargs)
     kwargs.setdefault("max", config.builddmaster.download_connections)
+    # ampoule defaults to stopping child processes after they've been idle
+    # for 20 seconds, which is a bit eager since that's close to our scan
+    # interval.  Bump this to five minutes so that we have less unnecessary
+    # process stop/start activity.  This isn't essential tuning so isn't
+    # currently configurable, but if we find we need to tweak it further
+    # then we should add a configuration setting for it.
+    kwargs.setdefault("maxIdle", 300)
     return ProcessPool(DownloadProcess, starter=starter, **kwargs)