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 Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: rainer-phpbugs at 7val dot com
New email:
PHP Version: OS:

 

 [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

Pull Requests

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-2024 The PHP Group
All rights reserved.
Last updated: Sun Dec 08 12:01:28 2024 UTC