fix setting max connections

Signed-off-by: szaimen <szaimen@e.mail.de>
This commit is contained in:
szaimen 2022-08-22 22:45:03 +02:00
parent 20892c2d40
commit 2e1e53e9d3
3 changed files with 8 additions and 3 deletions

View file

@ -24,7 +24,9 @@ REDIS_CONF
echo "Setting php max children..."
MEMORY=$(mawk '/MemTotal/ {printf "%d", $2/1024}' /proc/meminfo)
PHP_MAX_CHILDREN=$((MEMORY/50))
export PHP_MAX_CHILDREN
if [ -n "$PHP_MAX_CHILDREN" ]; then
sed -i "s/^pm.max_children =.*/pm.max_children = $PHP_MAX_CHILDREN/" /usr/local/etc/php-fpm.d/www.conf
fi
# Check permissions in ncdata
touch "/mnt/ncdata/this-is-a-test-file"