PHP-FPM custom settings not working

Zanzo

Verified User
Joined
Jun 16, 2024
Messages
12
Background: I found this warning after a performance issue and I need to increase `pm.max_children` setting in /usr/local/php74/etc/php-fpm.conf from the default of 10 to 120.

server reached max_children setting (10), consider raising it

Originally, I did this manually in /usr/local/php74/etc/php-fpm.conf direct, unaware that it would be overwritten on update. It did, and the problem returned.

I found this doc that I thought was the answer. https://docs.directadmin.com/webser...l#warning-server-reached-max-children-setting. I tried both options on that doc.

1. `da config-set php_fpm_max_children_default 100` + `systemctl restart directadmin`
2. Admin Level -> Custom Httpd Config -> domain.com: php-fpm74 and adding `|?MAX_CHILDREN=120|` to the CUSTOM1 token area

In both cases, when I run `da build rewrite_confs`, /usr/local/php74/etc/php-fpm.conf simply reverts to 10.

Can anyone see anything obvious I am missing?
 
Last edited:
That setting not affect to "/usr/local/php74/etc/php-fpm.conf", it's only affect to the domains virtualhost.
 
That setting not affect to "/usr/local/php74/etc/php-fpm.conf", it's only affect to the domains virtualhost.

I don't think that's correct. This is specifically the php-fpm setting page. Not httpd.

Admin Level -> Custom Httpd Config -> domain.com: php-fpm74

The virtualhosts are at Admin Level -> Custom Httpd Config -> domain.com: http.conf

Screenshot 2025-02-21 at 7.59.13 PM.png


It's also mentioned in the doc page I linked to.

Do you have another option for setting `pm.max_children`? Clearly it has to be able to be changed and persist. It's a critical setting.
 
Oh, do you mean it only affects /usr/local/directadmin/data/users/mysite/php/php-fpm74.conf? Is that conf that fpm will use for that user?
 
you can take /usr/local/directadmin/data/templates/php-fpm.conf
copy to /usr/local/directadmin/data/templates/custom/php-fpm.conf
and modify as you wish, to have fixed config
 
Back
Top