0

PHP is running very slow like loads forever.

Below is the www.conf file values


; The number of child processes to be created when pm is set to 'static' and the
; maximum number of child processes when pm is set to 'dynamic' or 'ondemand'.
; This value sets the limit on the number of simultaneous requests that will be
; served. Equivalent to the ApacheMaxClients directive with mpm_prefork.
; Equivalent to the PHP_FCGI_CHILDREN environment variable in the original PHP
; CGI. The below defaults are based on a server without much resources. Don't
; forget to tweak pm.* to fit your needs.
; Note: Used when pm is set to 'static', 'dynamic' or 'ondemand'
; Note: This value is mandatory.
;pm.max_children = 5
pm.max_children = 200

; The number of child processes created on startup.
; Note: Used only when pm is set to 'dynamic'
; Default Value: min_spare_servers + (max_spare_servers - min_spare_servers) / 2
;pm.start_servers = 2
;pm.start_servers = 20

; The desired minimum number of idle server processes.
; Note: Used only when pm is set to 'dynamic'
; Note: Mandatory when pm is set to 'dynamic'
;pm.min_spare_servers = 1
;pm.min_spare_servers = 10

; The desired maximum number of idle server processes.
; Note: Used only when pm is set to 'dynamic'
; Note: Mandatory when pm is set to 'dynamic'
;pm.max_spare_servers = 3
;pm.max_spare_servers = 30

; The number of seconds after which an idle process will be killed.
; Note: Used only when pm is set to 'ondemand'
; Default Value: 10s
pm.process_idle_timeout = 3s;

; 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
pm.max_requests = 15

I tried with pm ondemand as well but still same challenge. Server resource usage is just fine not even half utilized.

It always start working when i do service php5.6-fpm reload Anything wrong i am doing?

Some more details.

Running ubuntu 16.04 LTS

Digital Ocean

NGINX 10

PHP fpm 5.6

Wordpress 4.9

  • Wordpress? cache aggressively via a CDN – jordanm May 01 '20 at 15:35
  • max_requests 15 is a very low figure, respawning is probably all your system does. Are the memory leaks so abundant? OTOH, max children is very high. Can your system carry so many? Of course, it all depends on the quality and performance of the applications you're running, but if those are OK, I'd go for 25 max. – Gerard H. Pille May 01 '20 at 15:46

0 Answers0