全球主机交流论坛

标题: 奇怪的Nginx+php5-fpm的502求指导,探针动不动就502,WP不会 [打印本页]

作者: HXS    时间: 2016-12-23 14:49
标题: 奇怪的Nginx+php5-fpm的502求指导,探针动不动就502,WP不会
本帖最后由 HXS 于 2016-12-23 14:52 编辑


http://hxs.fd.fj.cn/
http://149.56.242.123/p.php

探针多刷新一下就502,而其上的WordPress貌似怎么刷新却都不会502

php5-fpm已经提高了不少参数了


pm = dynamic

; 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 = 50

; 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 = 10

; 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 = 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 = 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 = 10s;

; 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 = 10000

作者: lsza    时间: 2016-12-23 14:51
无法显示此页
不如搜索一下你想要的,或者刷新网页试试吧。
360断网急救箱
作者: Satoshi    时间: 2016-12-23 15:42
关了opcache试试
作者: 日后再说    时间: 2016-12-23 15:59
本帖最后由 日后再说 于 2016-12-23 16:01 编辑

试试这样修改:
  1. pm = static
  2. pm.max_spare_servers = 256
复制代码



详细资料:https://www.jiloc.com/41488.html
作者: HXS    时间: 2016-12-23 16:26
日后再说 发表于 2016-12-23 15:59
试试这样修改:


pm.max_spare_servers = 256 ???

; 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'

作者: litter123    时间: 2016-12-23 16:28
简单快捷明了,备份配置文件和重要数据,直接清了php和nginx,重装Lnmp
作者: HXS    时间: 2016-12-23 16:32
日后再说 发表于 2016-12-23 15:59
试试这样修改:

我把
pm = static
pm.max_children = 256貌似没有出现502了
作者: HXS    时间: 2016-12-23 16:38
难道真的不能用dynamic吗?
我的pm.start_servers = 10难道还不够?我的流量不大啊
作者: 日后再说    时间: 2016-12-23 17:23
HXS 发表于 2016-12-23 16:32
我把
pm = static
pm.max_children = 256貌似没有出现502了

那么大的内存,你设成10简直就是浪费。




欢迎光临 全球主机交流论坛 (https://sunk.eu.org/) Powered by Discuz! X3.4