[文章作者:张宴 本文版本:v1.0 最后修改:2008.07.30 转载请注明原文链接:http://blog.zyan.cc/read.php/361/]

  昨日,有朋友问我,他将Web服务器换成Nginx 0.6.31  + PHP 4.4.7(FastCGI)后,有时候访问会出现“502 Bad Gateway”错误,如何解决。

  我让按照以下两个步骤去解决,最后在第2步中将FastCGI的timeout时间增加为300,问题解决:

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



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

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



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



Tags: , , , ,
技术大类 » Web服务器 | 评论(105) | 引用(0) | 阅读(185470)
Prada Outlet Online Email Homepage
2012-10-17 13:39
The chance at The articles, a good argument The hope can share The author more articles. I have paid attention to this site, and at The same time also recommend to your more friends. You can learn from each other.
Mulberry Factory Shop Email Homepage
2012-10-29 09:20
This is I want to find articles. I appreciate you spent a lot of time in the article. I believe that your article will be affected by a lot of people like.
Prada Outlet Email Homepage
2012-10-29 09:26
To tell you the truth. This article is well written, let us share such a good information! This is a very exciting things. Thank you for your masterpiece, it worth to read and learn. I will also share it to all people.
Michael Kors Outlet Email Homepage
2012-10-29 09:32
This is a very special articles, there are various structure and beautiful sentences to express, with different mentality to XinShangHui reading a different flavor. I think a lot of people will like the article.
valbrum Email
2012-11-2 22:29
umwava xzrctp qpysis
segnali opzioni binarie  ghjrns
valbrum Email
2012-11-2 22:48
puoqmo nrktcs tpnqls
broker opzioni binarie  mnidhc
Coach Email Homepage
2012-11-3 14:42
"The Coach Outletengines that will likely power the J-31 we do know a bit mor.Coach Outlet  Those engines were actually revealed at the Zhuhai showCoach Outlet in 2008," Fisher said referring to an annual China air show. He beCoach Outletlieves the new J-31 engine is undergoing preliminary
hfdgwe
2012-11-28 16:23
Mulberry Factory Shop Email Homepage
2012-12-5 10:51
Your blog is most people's attention. This is worthy of praise and learning. To provide a lot of knowledge. For everyone is a good opportunity to learn.
Michael Kors Outlet Online Email Homepage
2012-12-5 10:57
This is I have never seen a good article. Wonderful content and it's moving.Also will be more and more like it. Constantly to enjoy this kind of feeling.
Gucci Outlet Email Homepage
2012-12-5 11:03
Good prose is like a real delicious tea. We taste it will feel very sweet.This is a kind of good for readers to enjoy. It's really a good article!
Ethan
2012-12-7 03:14
This is a really good site post, im delighted I came across it. Ill be back down the track to check out other posts.car locksmith
Clarisonic Outlet Email Homepage
2012-12-10 09:17
The chance at The articles, a good argument The hope can share The author more articles. I have paid attention to this site, and at The same time also recommend to your more friends. You can learn from each other.
Gucci Outlet Email Homepage
2012-12-10 09:20
Very meaningful an article, I've been looking for a long time about this article. Finally see yes. This is an article I see good. Share it. Is worth to recommend.
Mulberry Handbags Email Homepage
2012-12-10 09:26
We often communicate with each other, encouraged each other and learn from each other. How to thank you? I'm back many comments.
aaa Homepage
2013-1-21 14:59
lovekillkillkillkillkillkillkillkillkillkillkillkillkillcrycrycrycrycrygringrincoolcool
FGAWER
2013-1-29 17:32
买轴承就到:www.jkzhoucheng.cn
GAWERWE
2013-3-7 14:39
买轴承就到:www.jkzhoucheng.cn
superhosts
2013-4-7 11:01
/usr/local/php5/bin/php-cgi -b 192.168.80.132:9000   我用这个命令 在生成一组 php-cgi     怎么不行啊
磨延城 Email Homepage
2013-10-21 20:54
磨途歌学习了
分页: 5/6 第一页 上页 1 2 3 4 5 6 下页 最后页
发表评论
表情
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
打开HTML
打开UBB
打开表情
隐藏
记住我
昵称   密码   游客无需密码
网址   电邮   [注册]