From 2545d91e04a8339fbb5383ff864bbfdbbec85dfb Mon Sep 17 00:00:00 2001 From: Josh Knapp Date: Tue, 11 Apr 2023 13:23:14 -0700 Subject: [PATCH] Some tuning of PHP and apache --- configs/default-index.conf | 13 ++++++++++++- scripts/create-php-config.sh | 14 +++++--------- 2 files changed, 17 insertions(+), 10 deletions(-) diff --git a/configs/default-index.conf b/configs/default-index.conf index 68cfa42..c812ed9 100644 --- a/configs/default-index.conf +++ b/configs/default-index.conf @@ -1,2 +1,13 @@ DirectoryIndex index.html index.htm index.php -Alias "/ping" "/var/www/html" \ No newline at end of file +Alias "/ping" "/var/www/html" + + + StartServers 10 + MinSpareThreads 25 + MaxSpareThreads 75 + ThreadLimit 64 + ThreadsPerChild 25 + MaxRequestWorkers 800 + ServerLimit 32 + MaxConnectionsPerChild 1500 + \ No newline at end of file diff --git a/scripts/create-php-config.sh b/scripts/create-php-config.sh index 9d7048e..cbd8621 100644 --- a/scripts/create-php-config.sh +++ b/scripts/create-php-config.sh @@ -12,16 +12,12 @@ listen = /run/php-fpm/www.sock listen.owner = apache listen.group = apache -pm = dynamic -pm.max_children = 50 -pm.start_servers = 5 -pm.min_spare_servers = 5 -pm.max_spare_servers = 35 -pm.process_idle_timeout = 15s; -pm.max_requests = 500 +pm = static +pm.max_children = 25 +pm.max_requests = 1000 -slowlog = /var/log/php-fpm/www-slow.log -request_slowlog_timeout = 6s +slowlog = /etc/httpd/logs/error_log +request_slowlog_timeout = 3s php_admin_value[error_log] = /etc/httpd/logs/error_log php_admin_flag[log_errors] = on