nginx报 502错误
来源:互联网 发布:认知心理学教材 知乎 编辑:程序博客网 时间:2024/05/01 04:01
查nginx日志如下:
connect() to unix:/tmp/php-cgi.sock failed
解决:
最终发现是因为突然的网站访问量大导致,因为子进程数不足:
到php-fpm.conf找到max_children也就是子进程最大数改为:<value name="max_children">128</value>
附:
1:通过命令查看服务器上一共开了多少的 php-cgi 进程
ps -fe |grep "php"|grep -v "grep"|wc -l
2:查看已经有多少个php-cgi进程用来处理tcp请求
netstat -anop |grep "php"|grep -v "grep"|wc -l
如果netstat -anop |grep "php"|grep -v "grep"|wc -l 这个值快接近于php-fpm.conf中的max_children值,那么需要适当调大max_children.
0 0
- nginx报 502错误
- nginx报502错误
- nginx 报499 502等错误处理
- nginx报502、504、400、413错误
- nginx+uwsgi+django报502错误分析
- php-fpm nginx配置,报502错误问题
- Ubuntu 12.10 安装nginx后报502错误
- nginx报 File not found 错误
- nginx报 File not found 错误
- https post请求,Nginx报405错误
- nginx 报 Internal Server Error 错误
- nginx+tomcat报504超时错误
- 启动Nginx报[10013]错误的解决方案
- nginx 下安装nginx_concat_module报400错误
- nginx 报 413 错误以及解决办法整理
- nginx报403错误(13:Permission denied)
- nginx加php-fpm报502 bad gateway错误五种解决方法
- 使用xhprof会在nginx下报502 Bad Gateway错误
- 基本数据结构-栈的实现及其运用
- 超图 Iobject java 7C---学习中
- JSON在服务器端的生成,和所用jar包
- sync 和 fsync
- 【python】判断字符串
- nginx报 502错误
- iOS shareSDK的分享与第三方登陆 (详解)
- 导出数据到excel工具类
- 用UIButton 自定义UITabbarController+UINavgationController 实现页面跳转
- UvaOJ 537 - Artificial Intelligence?
- linux command to open pdf ,dir, html
- ThinkPHP查询返回简单字段数组
- hbase性能优化大全,很全,很牛
- bash_profile,bashrc,profile等区别