mirror of
https://github.com/nextcloud/all-in-one.git
synced 2025-12-20 06:26:57 +00:00
change php-max-children calculation
Signed-off-by: Simon L <szaimen@e.mail.de>
This commit is contained in:
parent
2221cc7f52
commit
c85bacc940
1 changed files with 5 additions and 0 deletions
|
|
@ -33,8 +33,13 @@ REDIS_CONF
|
|||
echo "Setting php max children..."
|
||||
MEMORY=$(awk '/MemTotal/ {printf "%d", $2/1024}' /proc/meminfo)
|
||||
PHP_MAX_CHILDREN=$((MEMORY/50))
|
||||
# 100 is the default, we do not want to go lower than this
|
||||
if [ "$PHP_MAX_CHILDREN" -lt 100 ]; then
|
||||
PHP_MAX_CHILDREN=100
|
||||
fi
|
||||
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
|
||||
sed -i "s/^;pm.process_idle_timeout =.*/pm.process_idle_timeout = 3s/" /usr/local/etc/php-fpm.d/www.conf
|
||||
fi
|
||||
|
||||
# Check permissions in ncdata
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue