From: Grant Slater Date: Fri, 21 Dec 2018 12:53:24 +0000 (+0000) Subject: imagery: limit mapserv by CPU time X-Git-Url: https://git.openstreetmap.org/chef.git/commitdiff_plain/57eb58f11b649ec5f577c443c779e03d44b50d51 imagery: limit mapserv by CPU time Use CPU time as a poor mans process limit, to kill process before it has leaked too much memory. Memory limits do not seem to kill the process. --- diff --git a/cookbooks/imagery/resources/site.rb b/cookbooks/imagery/resources/site.rb index 16e48d380..86c70c37e 100644 --- a/cookbooks/imagery/resources/site.rb +++ b/cookbooks/imagery/resources/site.rb @@ -106,8 +106,8 @@ action :create do "MS_ERRORFILE" => "stderr", "GDAL_CACHEMAX" => "512" limit_nofile 16384 - limit_as "1G" - memory_max "2G" + limit_cpu: 60 + memory_max "4G" user "imagery" group "imagery" exec_start_pre "/bin/rm -f /run/mapserver-fastcgi/layer-#{new_resource.site}-#{index}.socket"