I'm not much of a system / network administrator. I'm searching for a way to properly determine the settings of my php-fpm.
So far I found this article explaining the details to calculate these settings based on the server specs (https://chrismoore.ca/2018/10/finding-the-correct-pm-max-children-settings-for-php-fpm/): pm.max_children pm.start_servers pm.min_spare_servers pm.max_spare_servers
But there's a setting here
pm.max_requests, so I'm wondering what value I should put here? How do I determine what value I should put there? Should I leave it at default 0?
sigma(#cores) / gamma(#RAM memory) ^ psi(#concurrent users) * rho(moon phase), that result in an "optimal" value. Much depends on your own use-cases.
pm.max_requests intThe number of requests each child process should execute before respawning. This can be useful to work around memory leaks ... Default value:
0." - based on that info: As a sysadmin I would adjust the default when monitoring shows that over time each php_fpm process starts consuming more and more memory (indicating a memory leak somewhere) and otherwise there is no immediate need to adjust the default value.