一个让银蛋疼的博客
解决nginx 502 bad getaway
1:查看当前的PHP FastCGI进程数是否够用:
netstat -anpo | grep "php-cgi" | wc -l
如果实际使用的“FastCGI进程数”接近预设的“FastCGI进程数”,那么,说明“FastCGI进程数”不够用,需要增大。
2:关于php-fpm.conf
php-fpm里面的这两个参数
如果php-cgi在xx时间内有xx个进程因为资源不足退出就平滑重启
; If this number of child processes exit with SIGSEGV or SIGBUS within the time ; interval set by emergency_restart_interval then FPM will restart. A value ; of '0' means 'Off'. ; Default Value: 0 emergency_restart_threshold = 5 ; Interval of time used by emergency_restart_interval to determine when ; a graceful restart will be initiated. This can be useful to work around ; accidental corruptions in an accelerator's shared memory. ; Available Units: s(econds), m(inutes), h(ours), or d(ays) ; Default Unit: seconds
上一篇 | 下一篇
发表评论
浏览本博请不要用淫荡的眼神和思想,谢谢合作
Browse this blog, please do not use the lustful eyes and thought, thank you
