|
@@ -31,7 +31,7 @@ sed -e "s/##MYSQL_DATABASE/${MYSQL_DATABASE}/" \
|
|
|
|
|
|
# Generate pre-fork configuration
|
|
# Generate pre-fork configuration
|
|
memory_limit=$(cat /sys/fs/cgroup/memory/memory.limit_in_bytes) # this is the RAM. we have equal amount of swap
|
|
memory_limit=$(cat /sys/fs/cgroup/memory/memory.limit_in_bytes) # this is the RAM. we have equal amount of swap
|
|
-concurrency=$((memory_limit*2/1024/1024/40)) # wp has 40MB limit
|
|
|
|
|
|
+concurrency=$((memory_limit*2/1024/1024/50)) # wp has 40MB limit. 10MB to accomodate some leaks
|
|
|
|
|
|
echo "Setting max requests to ${concurrency}"
|
|
echo "Setting max requests to ${concurrency}"
|
|
sed -e "s/MaxRequestWorkers.*/MaxRequestWorkers ${concurrency}/" /etc/apache2/mods-available/mpm_prefork.conf.template > /run/wordpress/mpm_prefork.conf
|
|
sed -e "s/MaxRequestWorkers.*/MaxRequestWorkers ${concurrency}/" /etc/apache2/mods-available/mpm_prefork.conf.template > /run/wordpress/mpm_prefork.conf
|