为什么 php-fpm 需要 pm.max_requests 配置?

时间:2021-04-07 02:41:58

标签: php

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 似乎不太可能发生内存泄漏。为什么需要这个配置?

0 个答案:

没有答案
相关问题