Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added pm.max_requests to pool #486

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

ifaridjalilov
Copy link

You can set with PHP_FPM_PM_MAX_REQUESTS.
Default 1000

Copy link

@angristan angristan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! I was searching for this option as well.

Let's keep in mind the default seems to be 0 (https://www.php.net/manual/en/install.fpm.configuration.php):

pm.max_requests (int)
The number of requests each child process should execute before respawning. This can be useful to work around memory leaks in 3rd party libraries. For endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS. Default value: 0.

So we might want to keep that.

@angristan
Copy link

Also process_idle_timeout might be cool to have as well.

pm.process_idle_timeout
The number of seconds after which an idle process will be killed. Used only when pm is set to ondemand. Available units: s(econds)(default), m(inutes), h(ours), or d(ays). Default value: 10s.

@thueske
Copy link

thueske commented Jan 17, 2025

Very cool! Looking for exactly that feature. In my opinion, however, the default should also be 0, as this is also in the FPM default.

And some documentation should be added, it's missing in the PR. I did this here: #513

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants