We're running a php-fpm container in Kubernetes. This is a test setup, so to preserve resources, php-fpm (8.1) is configured with:
pm = ondemand
pm.max_children = 5
pm.max_requests = 1000
The application is not in use (e.g. no requests to the application, nothing in the access log). Still, there is always one worker process running in this pool.
Question: How can I find out what is causing php-fpm to spawn this worker?
Things I looked at:
- netstat: php-fpm: master process listening on port 9000, and connected to two unix sockets (which would be stdout and stderr), nothing else
- access logs: empty
- config: pm.min_spare_servers is set to 1 (which is the default) but the config file states this is only used with the 'dynamic' scheduler
- when running php-fpm with identical config outside of Kubernetes no children are spawned (or all of them exit) when the site is idle