PHP-FPM questions
What a beast of a software... Documentation in php.net is obscure to the max, some configs not documented at all. I have few question, which I couldn't google.
Example (Apache2 + PHP-FPM 8.1) CFG:
[global]
pid = /run/php/php8.1-fpm.dronten.pid
[dronten]
user = dronten
group = dronten
listen = /run/php/php8.1-fpm.dronten.sock
listen.owner = www-data
listen.group = www-data
listen.mode = 0660
pm = dynamic
pm.max_children = 5
pm.start_servers = 2
pm.min_spare_servers = 1
pm.max_spare_servers = 3
include = /etc/php/shared-values.inc
Shared-values.inc content:
php_admin_value[session.save_path] = "/var/lib/php/sessions/$pool"
php_admin_value[soap.wsdl_cache_dir] = "/var/lib/php/wsdlcache/$pool"
php_admin_value[opcache.file_cache] = "/var/lib/php/opcache/$pool"
listen.allowed_clients = 127.0.0.1
access.log = /var/log/php-fpm/$pool.access
access.format = "%{REMOTE_ADDR}e - %u %t \"%m %r%Q%q\" %s %f %{seconds}d %{mega}M %{user}C%%"
slowlog = /var/log/php-fpm/$pool.slow
Issues/questions:
Is it possible to restart/reload pool instead of entire php-fpm? I have user "dronten" and separate pool cfg. I want to restart/reload only this user, leaving all other users intact.
Custom session.save_path not working. There is no sessions created in that folder. PHPinfo shows correct session path. Where the f... is session files?
OPcache security problem with shared pool should be resolved by setting separate session path. Am I correct?
Comments
Not to my knowledge because it is a system service and not a user service.
Check file permissions make sure it is writable. Make sure there are no typos in the path and hardcore it if you need.
From what I can gather yes that will work.
"I would have gotten away with it too, if it wasn't for that meddling Frankz and Mason!!"
https://stackoverflow.com/questions/16890855/can-we-reload-one-of-the-php-fpm-pool-without-disturbing-others
See if this gets you to your goal.
"I would have gotten away with it too, if it wasn't for that meddling Frankz and Mason!!"
From openAI: