I think the connection between nginx and php-pfm is persistent conncetion. After I read the php-fpm source code, I found that the connection will not be closed after php-fpm processed the request. Once the processed num arrvied the config num(php-fpm.ini can config) , the php-fpm will close the connection actively. So I wonder to know whether my understanding is right?
The connection between nginx and php-fpm is not persistent but should have been when keepalive is enabled as described in https://serverfault.com/questions/739918/whats-the-relationship-between-an-nginx-worker-process-and-php-fpm by florin
One could argue that if you enable fastcgi keepalive in nginx, php-fpm processes would remain there longer. Considering that each worker process gets its own connection pool for upstreams that use keepalive, it could cause php-fpm to keep more processes running at all times for each worker process. However, fastcgi keepalive is broken in php-fpm as far as I am aware so it shouldn't be a problem