php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #68824 php-rpm pm=static causes load peaks when pm.max_requests is reached
Submitted: 2015-01-13 11:29 UTC Modified: 2021-12-04 21:12 UTC
Votes:2
Avg. Score:3.5 ± 0.5
Reproduced:1 of 2 (50.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: rainer-phpbugs at 7val dot com Assigned: bukka (profile)
Status: Assigned Package: FPM related
PHP Version: 5.6.4 OS: linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
21 - 11 = ?
Subscribe to this entry?

 
 [2015-01-13 11:29 UTC] rainer-phpbugs at 7val dot com
Description:
------------
By design, php-fpm starts all pm.max_children at the same time, and therefore, will also re-start all children roughly at the same time when they reach  pm.max_requests. This causes the load on the Server, as well as latencies to increase until all children are re-started, their caches warmed up etc.

It would be preferable to randomize the number of requests until a child is reaped, instead of always using exactly pm.max_requests. For example, a random value within  pm.max_requests plus or minus 10% could be chosen for each child.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2015-01-13 17:58 UTC] aharvey@php.net
-Package: Performance problem +Package: FPM related
 [2021-12-04 21:12 UTC] bukka@php.net
-Type: Bug +Type: Feature/Change Request -Assigned To: +Assigned To: bukka
 [2021-12-04 21:12 UTC] bukka@php.net
This is the way how the accept scheduling works - this could be improved by using epoll which we might need for other things (e.g. bootstrapping) as well. See related discussion for more details in this pr (it is for ondemand but the actual loop is not mode dependent): https://github.com/php/php-src/pull/4101

I'm changing this to request as it is more feature request though.
 
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Wed Jul 06 14:04:07 2022 UTC