在php document中,pm.max_requests
被描述为The number of requests each child process should execute before respawning. This can be useful to work around memory leaks in 3rd party libraries.
换句话说,这个配置是用来prevent memory leaks from PHP worker
的,而不是PHP脚本的执行。
据我所知,在 php-fpm worker 中执行的 php 脚本的内存将在执行后被释放。因此,除了 PHP worker
之外,during the execution of a PHP script
似乎不太可能发生内存泄漏。为什么需要这个配置?