Skip to content

Commit

Permalink
restart the webservers services one time...
Browse files Browse the repository at this point in the history
...no matter the outcome of `calculate_php_fpm()`

Fix for #943 943
  • Loading branch information
enoch85 committed Sep 17, 2019
1 parent 6d405de commit 61d3198
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,6 @@ If you think this is a bug, please report it to $ISSUES"
exit 1
else
check_command sed -i "s|pm.max_children.*|pm.max_children = $PHP_FPM_MAX_CHILDREN|g" $PHP_POOL_DIR/nextcloud.conf
restart_webserver
print_text_in_color "$IGreen" "pm.max_children was set to $PHP_FPM_MAX_CHILDREN"
# Check if the sum of all the current values are more than $PHP_FPM_MAX_CHILDREN and only continue it is
if [ $PHP_FPM_MAX_CHILDREN -gt $CURRENT_SUM ]
Expand All @@ -343,7 +342,6 @@ else
if [ "$(grep pm.start_servers $PHP_POOL_DIR/nextcloud.conf | awk '{ print $3}')" -lt $min_start_servers ]
then
check_command sed -i "s|pm.max_spare_servers.*|pm.max_spare_servers = $((PHP_FPM_MAX_CHILDREN - 30))|g" $PHP_POOL_DIR/nextcloud.conf
restart_webserver
print_text_in_color "$IGreen" "pm.max_spare_servers was set to $((PHP_FPM_MAX_CHILDREN - 30))"
fi
fi
Expand All @@ -359,8 +357,8 @@ then
check_command sed -i "s|pm.max_spare_servers.*|pm.max_spare_servers = 3|g" $PHP_POOL_DIR/nextcloud.conf
print_text_in_color "$ICyan" "All PHP-INI values were set back to default values as the value for pm.max_children ($PHP_FPM_MAX_CHILDREN) was lower than the sum of all the current values ($CURRENT_SUM)"
print_text_in_color "$ICyan" "Please run this again to set optimal values"
restart_webserver
fi
restart_webserver
}

test_connection() {
Expand Down

0 comments on commit 61d3198

Please sign in to comment.