jenkins-bot has submitted this change and it was merged.

Change subject: Configure thumbor subprocess limits
......................................................................


Configure thumbor subprocess limits

Bug: T120940
Change-Id: I95ce526c535fccb508e3a48cd83ddf58da8e6181
---
M puppet/modules/role/settings/thumbor.yaml
M puppet/modules/thumbor/manifests/init.pp
M puppet/modules/thumbor/templates/thumbor.conf.erb
3 files changed, 8 insertions(+), 4 deletions(-)

Approvals:
  Dduvall: Looks good to me, approved
  Filippo Giunchedi: Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/puppet/modules/role/settings/thumbor.yaml 
b/puppet/modules/role/settings/thumbor.yaml
index 46a23c4..2427d90 100644
--- a/puppet/modules/role/settings/thumbor.yaml
+++ b/puppet/modules/role/settings/thumbor.yaml
@@ -1,3 +1,4 @@
+vagrant_ram: 256
 forward_ports:
   8888: 8888 # thumbor
   6081: 6081 # varnish
diff --git a/puppet/modules/thumbor/manifests/init.pp 
b/puppet/modules/thumbor/manifests/init.pp
index 5118c71..69886f1 100644
--- a/puppet/modules/thumbor/manifests/init.pp
+++ b/puppet/modules/thumbor/manifests/init.pp
@@ -3,9 +3,7 @@
 # This Puppet class installs and configures a Thumbor instance
 #
 # Thumbor is installed as a Python package, and as part of that,
-# pip compiles lxml. This is memory-intensive; you might have to
-# increase the memory available to the VM with something like
-# 'vagrant config vagrant_ram 2048; vagrant reload'.
+# pip compiles lxml.
 #
 # === Parameters
 #
@@ -106,7 +104,7 @@
     }
 
     cgroup::config { 'thumbor':
-        limits  => 'memory { memory.limit_in_bytes = "104857600"; }', # 100MB
+        limits  => "perm { task { uid = thumbor; gid = thumbor; } admin { uid 
= thumbor; gid = thumbor; } } memory { memory.limit_in_bytes = \"1048576000\"; 
}", # 1GB
         cgrules => '@thumbor memory thumbor',
     }
 
diff --git a/puppet/modules/thumbor/templates/thumbor.conf.erb 
b/puppet/modules/thumbor/templates/thumbor.conf.erb
index 2b9ee7d..54a010e 100644
--- a/puppet/modules/thumbor/templates/thumbor.conf.erb
+++ b/puppet/modules/thumbor/templates/thumbor.conf.erb
@@ -587,6 +587,11 @@
 EXIF_TINYRGB_PATH = '/srv/thumbor/tinyrgb.icc'
 EXIF_TINYRGB_ICC_REPLACE = 'IEC 61966-2.1 Default RGB colour space - sRGB'
 
+SUBPROCESS_TIMEOUT_PATH = '/usr/bin/timeout'
+SUBPROCESS_TIMEOUT = 60
+SUBPROCESS_CGEXEC_PATH = '/usr/bin/cgexec'
+SUBPROCESS_CGROUP = 'memory:thumbor'
+
 PROXY_ENGINE_ENGINES = [ 'thumbor.engines.pil' ]
 
 
################################################################################

-- 
To view, visit https://gerrit.wikimedia.org/r/259640
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I95ce526c535fccb508e3a48cd83ddf58da8e6181
Gerrit-PatchSet: 5
Gerrit-Project: mediawiki/vagrant
Gerrit-Branch: master
Gerrit-Owner: Gilles <[email protected]>
Gerrit-Reviewer: BryanDavis <[email protected]>
Gerrit-Reviewer: Dduvall <[email protected]>
Gerrit-Reviewer: Filippo Giunchedi <[email protected]>
Gerrit-Reviewer: Gilles <[email protected]>
Gerrit-Reviewer: Ori.livneh <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to