I have a website using NGINX and PHP-FPM. As you know, PHP-FPM has a status page for its pools with detailed information about these processes. My problem is that over time, many processes become “terminating” and do not change their “finish” state until I restart PHP-FPM.
The bad news is that the “finish” processes are considered active processes, and the number of active processes exceeds pm.max_children. Bad things are happening on my site.
I know some parameters of the php-fpm pool to kill idle processes, but I cannot find parameters to kill terminating processes after a certain time.
How to work with PHP-FPM finalization state? Is there a configuration option to kill these “finishing” processes after a while? Could this be the wrong configuration between NGINX and PHP-FPM? What are the reasons for the "completion" of states?
Here is a php-fpm status image. Reds end states, and this is what I'm trying to fix. The URI request is a different page on my site.

Thank you for your knowledge.
PD1: Now I reload PHP-FPM every 15 minutes, and it "fixes" a more or less clean state ... but I think this can be an important performance problem with a lot of traffic.
PD2: , , , , php-fpm, pid, .