分享在linux环境下网站提示502 Bad Gateway的解决方法
来源:互联网 发布:蚕丝毛毯 知乎 编辑:程序博客网 时间:2024/05/22 13:26
网站访问提示502 Bad Gateway怎么解决?根据分析一般是php线程打开文件句柄受限导致的。
分享在linux环境下网站提示502 Bad Gateway的解决方法
1、提升服务器的文件句柄打开打开vi /etc/security/limits.conf 底部加上* soft nofile 51200* hard nofile 51200vi /etc/sysctl.conf 底部添加fs.file-max=51200
2、提升nginx的进程文件打开数vi /www/wdlinux/nginx/conf/nginx.confworker_rlimit_nofile 5120; 改成worker_rlimit_nofile 51200;
3、修改php-fpm.conf文件,主要需要修改2处。vi /www/wdlinux/etc/php-fpm.conf改成下面的值<value name="max_requests">10240</value><value name="rlimit_files">51200</value>
4、设置php-fpm自动启动vi /etc/rc.local 最后增加/etc/init.d/php-fpm start
5、完成之后reboot重启下服务器ulimit -n 查看
原文参考资源共享网:www.5azyw.com/thread-1296-1-1.html
0 0
- 分享在linux环境下网站提示502 Bad Gateway的解决方法
- Nginx 502 bad gateway问题的解决方法
- Nginx 502 bad gateway问题的解决方法
- PHPStorm 提示502 Bad Gateway
- linux系统下nginx+php-fpm报错:502 Bad Gateway解决方法
- 网站报502 bad gateway
- 网站报502 Bad Gateway
- nginx 下 thinkphp 502 bad Gateway + "LNMP一键安装包的Nginx 502 Bad Gateway错误可能原因及解决方法"
- LNMP时,出现502 Bad Gateway的错误提示
- nginx 502 Bad Gateway 的一种解决方法(转载)
- lnmp一键包502 Bad Gateway彻底的解决方法
- Nginx 502 Bad Gateway错误的原因分析与解决方法
- Nginx 502 Bad Gateway 错误的原因及解决方法
- Nginx 502 Bad Gateway 错误的原因及解决方法
- nginx+php显示 502 bad gateway的解决方法
- nginx+php显示 502 bad gateway的解决方法
- nginx+php显示 502 bad gateway的解决方法
- nginx+php显示 502 bad gateway的解决方法
- Android learning Starting!
- H264 获取SPS与PPS(附源码)
- jquery动态添加删除一行数据
- 正则表达式matcher.group用法
- 百度快照的原理
- 分享在linux环境下网站提示502 Bad Gateway的解决方法
- Javascript操作DOM - 1
- Entity Framework 连接操作 Sqlite 数据库
- hud--1021--Fibonacci Again
- 设计模式-单例模式和多例模式
- 2014.6.15总结
- LCA的tarjan算法的理解
- 产品思维----感想
- Hadoop Pig学习笔记(一) 各种SQL在PIG中实现