专注于互联网--专注于架构

最新标签
网站地图
文章索引
Rss订阅

首页 »web服务器 » nginxfastcgi:解决Nginx + PHP(FastCGI)遇到的502 Bad Gateway错误 »正文

nginxfastcgi:解决Nginx + PHP(FastCGI)遇到的502 Bad Gateway错误

来源: 发布时间:星期日, 2009年1月4日 浏览:67次 评论:0
Web服务器换成Nginx 0.6.31  + PHP 4.4.7(FastCGI)后有时候访问会出现“502 Bad Gateway”如何解决

  按照以下两个步骤去解决最后在第2步中将FastCGItimeout时间增加为300问题解决:

  PS:比较羡慕迅雷Web服务器16G内存



  1、查看当前PHP FastCGI进程数是否够用:
netstat -anpo | grep "php-cgi" | wc -l

  如果实际使用“FastCGI进程数”接近预设“FastCGI进程数”那么介绍说明“FastCGI进程数”不够用需要增大



  2、部分PHP执行时间超过了Nginx等待时间可以适当增加nginx.conf配置文件中FastCGItimeout时间例如:
......
http
{
......
fastcgi_connect_timeout 300;
fastcgi_send_timeout 300;
fastcgi_read_timeout 300;
......
}
......

0

相关文章

读者评论

发表评论

  • 昵称:
  • 内容: