Gilles has uploaded a new change for review.

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

Change subject: Define Thumbor subprocess limits
......................................................................

Define Thumbor subprocess limits

Won't actually be used until the base engine is merged and one of
those engines is added to the thumbor role:

I00a7f38732a308d30f12851a1d02343e02436ed4

Change-Id: Icaf0ac8a32dda6ddebd7e16b33651adb9d5e885d
---
M puppet/modules/thumbor/manifests/init.pp
M puppet/modules/thumbor/templates/thumbor.conf.erb
2 files changed, 9 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant 
refs/changes/21/258121/1

diff --git a/puppet/modules/thumbor/manifests/init.pp 
b/puppet/modules/thumbor/manifests/init.pp
index 435208b..a6d3e89 100644
--- a/puppet/modules/thumbor/manifests/init.pp
+++ b/puppet/modules/thumbor/manifests/init.pp
@@ -110,6 +110,10 @@
         cgrules => '@thumbor memory thumbor',
     }
 
+    cgroup::config { 'thumbor_subprocess':
+        limits  => 'memory { memory.limit_in_bytes = "104857600"; }', # 100MB
+    }
+
     file { '/etc/init/thumbor.conf':
         ensure  => present,
         content => template('thumbor/upstart.erb'),
diff --git a/puppet/modules/thumbor/templates/thumbor.conf.erb 
b/puppet/modules/thumbor/templates/thumbor.conf.erb
index 2b9ee7d..07ee03b 100644
--- a/puppet/modules/thumbor/templates/thumbor.conf.erb
+++ b/puppet/modules/thumbor/templates/thumbor.conf.erb
@@ -589,4 +589,9 @@
 
 PROXY_ENGINE_ENGINES = [ 'thumbor.engines.pil' ]
 
+SUBPROCESS_TIMEOUT = 30
+SUBPROCESS_TIMEOUT_PATH = '/usr/bin/timeout'
+SUBPROCESS_CGEXEC_PATH = '/usr/bin/cgexec'
+SUBPROCESS_CGROUP = 'memory:thumbor_subprocess'
+
 
################################################################################

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Icaf0ac8a32dda6ddebd7e16b33651adb9d5e885d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/vagrant
Gerrit-Branch: master
Gerrit-Owner: Gilles <[email protected]>

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

Reply via email to