Skip to content

Added pm.max_requests to pool#486

Closed
ifaridjalilov wants to merge 5 commits into
serversideup:mainfrom
ifaridjalilov:main
Closed

Added pm.max_requests to pool#486
ifaridjalilov wants to merge 5 commits into
serversideup:mainfrom
ifaridjalilov:main

Conversation

@ifaridjalilov
Copy link
Copy Markdown

You can set with PHP_FPM_PM_MAX_REQUESTS.
Default 1000

Copy link
Copy Markdown

@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
Copy Markdown

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.

@twiesing
Copy link
Copy Markdown

twiesing 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

@jaydrogers
Copy link
Copy Markdown
Member

Thanks for raising this feature @ifaridjalilov.

Since #513 has the documentation and the proper defaults, I am going to use that PR.

Thanks for publishing this though. We will always appreciate any future contributions 👍

@jaydrogers jaydrogers closed this Mar 5, 2025
@github-project-automation github-project-automation Bot moved this from 🤔 Evaluating to Done in serversideup/php v4.0 Mar 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

No open projects
Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants