Configuration for FPM pool behind this Friendica instance
I have some PHP-FPM pools running on this server and noticed that often others like #Nextcloud were slowing down or had become unreachable. When I checked with htop
on my server, I saw that a lot child processes (if not even all) are working for Friendica.
I tried lower or higher values for the amount of child processes but no real change happened.Then I tried to change the pool type to dynamic
(it was set to ondemand
) and I have no slow-downs on any PHP-FPM pool anymore.
So in case you are running in the same issue, this was the cause. And for those who are interested in the final configuration file:
root@zulu289:/etc/php/7.4/fpm# grep -v ";" pool.d/friendica.conf |sort --unique
chdir = /
[f.haeder.net]
group = www-data
listen.allowed_clients = 127.0.0.1
listen.group = www-data
listen.mode = 0660
listen.owner = www-data
listen = /var/run/apache2/php7.4-fpm_friendica.sock
php_admin_flag[log_errors] = on
php_admin_value[error_log] = /var/www/.../phptmp/fpm-php.friendica.log
php_admin_value[memory_limit] = 128M
php_admin_value[session.save_path] = /var/www/.../phptmp
pm = dynamic
pm.max_children = 1000
pm.max_requests = 10000
pm.max_spare_servers = 15
pm.min_spare_servers = 5
pm.status_path = /pool-status
request_slowlog_timeout = 20s
slowlog = /var/log/php-fpm/$pool-slow.log
user = vuXXXX
root@zulu289:/etc/php/7.4/fpm#
I have only obscured the full paths and
user
variable.
Roland Häder🇩🇪
in reply to Roland Häder🇩🇪 • •Roland Häder🇩🇪
in reply to Roland Häder🇩🇪 • •