全球主机交流论坛

标题: 【求指导求指教】操,被ubuntu14的nginx的502搞的头大! [打印本页]

作者: t9913085    时间: 2016-12-21 23:44
标题: 【求指导求指教】操,被ubuntu14的nginx的502搞的头大!
本帖最后由 t9913085 于 2016-12-22 08:33 编辑

谁能指导一下到底要增大那些参数,才不会偶尔502

尼玛,我现在点探针的运算速度测试,点快了偶尔都会502
作者: ericls    时间: 2016-12-22 01:48
Nginx 又不能跑php 多折腾下 fpm
作者: t9913085    时间: 2016-12-22 08:32
ericls 发表于 2016-12-22 01:48
Nginx 又不能跑php 多折腾下 fpm

我知道,已经增大了配置10倍,可还是偶尔出现502

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 = 500
作者: 薅羊毛    时间: 2016-12-22 08:33
不是一件包吗?没碰到过,每次我都用 奇云测 测试探针 也没咋地
作者: t9913085    时间: 2016-12-22 08:36
薅羊毛 发表于 2016-12-22 08:33
不是一件包吗?没碰到过,每次我都用 奇云测 测试探针 也没咋地

不喜欢一键包,想学一下手动配置
作者: 薅羊毛    时间: 2016-12-22 08:39
t9913085 发表于 2016-12-22 08:36
不喜欢一键包,想学一下手动配置

那可能优化问题,你可以看看 一键包里面的配置 参考下
如果不是专业人士 我觉得还是一键包好 省时省力
有些技能 没必要掌握




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