From: Platonides Date: Fri, 8 Mar 2013 09:51:55 +0000 (+0100) Subject: (Bug 45854) Unset the cgroup if we don't have a memory limit X-Git-Tag: 1.31.0-rc.0~20416^2 X-Git-Url: http://git.cyclocoop.org//%27%40script%40/%27?a=commitdiff_plain;h=e77397fc1de324dfc6d7b515e9440bd564311dd9;p=lhc%2Fweb%2Fwiklou.git (Bug 45854) Unset the cgroup if we don't have a memory limit We only create the cgroup if there's a memory limit, but it tried to always cleanup it, regardless if it was used or not, resulting in a «/sys/fs/cgroup/memory/mediawiki/job/32466/tasks: No such file or directory» error, when run with MW_CGROUP='mediawiki'; MW_MEM_LIMIT=0 Change-Id: I7fdb545b336ead62aa743b1bc3afdbfba2c3113f --- diff --git a/includes/limit.sh b/includes/limit.sh index 44b9edc272..bc1988de49 100644 --- a/includes/limit.sh +++ b/includes/limit.sh @@ -36,6 +36,8 @@ if [ "$MW_MEM_LIMIT" -gt 0 ]; then else ulimit -v "$MW_MEM_LIMIT" fi +else + MW_CGROUP="" fi if [ "$MW_FILE_SIZE_LIMIT" -gt 0 ]; then ulimit -f "$MW_FILE_SIZE_LIMIT"