[文章作者:张宴 本文版本: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进程数是否够用:
如果实际使用的“FastCGI进程数”接近预设的“FastCGI进程数”,那么,说明“FastCGI进程数”不够用,需要增大。
2、部分PHP程序的执行时间超过了Nginx的等待时间,可以适当增加nginx.conf配置文件中FastCGI的timeout时间,例如:
昨日,有朋友问我,他将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;
......
}
......
http
{
......
fastcgi_connect_timeout 300;
fastcgi_send_timeout 300;
fastcgi_read_timeout 300;
......
}
......
这个在哪加大呢?
http://www.w3cgroup.com/article.asp?id=250
如何知道预设的是多少
但是自从第一次安装好后,后来重新编译就不行,很多时候都是php不能正常显示,测试页也不能打开,
502 bad gateway这个提示。。。
而netstat -anpo|grep 'php-cgi'|wc -l 怎么一直的5
有点疑惑,望解答,谢谢
Starting php_fpm Error in argument 1, char 1: no argument for optio n -
Usage: php-cgi [-q] [-h] [-s] [-v] [-i] [-f <file>]
php-cgi <file> [args...]
-a Run interactively
-C Do not chdir to the script's directory
-c <path>|<file> Look for php.ini file in this directory
-n No php.ini file will be used
-d foo[=bar] Define INI entry foo with value 'bar'
-e Generate extended information for debugger/profi ler
-f <file> Parse <file>. Implies `-q'
-h This help
-i PHP information
-l Syntax check only (lint)
-m Show compiled in modules
-q Quiet-mode. Suppress HTTP Header output.
-s Display colour syntax highlighted source.
-v Version number
-w Display source with stripped comments and whites pace.
-z <file> Load Zend extension <file>.
................................... failed
Post cancel
| Back to logs list
| Back to logs list
the other:
timberland shoes for sale Copyright
tory burch leopard Summary
moncler usa
☞ manifold auxiliary:
� � � � � � � � � � � � � legendary PW � � � � �
PK tiny assistant timely
Bingtian accelerator
� � � � � � � assistant game hall � � � � � � � � � � �
dumplings QQ Landlords note card device
QQ note card each day
tour Seba note card device
Penguin QQ note card device
I adore the note card device
Friends of the Friends of the memorandum card device
Invincible note card device
naivete surround note card device
QQ games, the guanidine
class QQ games lobby to open Lianliankan registrar
Mirror 
� � � � � � � � � QQ Dancer � � � � � � � � �
dance of myth
's assistant
simple Dancer
quite evil from the auxiliary wing
lonely
Dancer a sky god
assistant
Dancer beef
Dancer ABC
memories dance
Dancer slightly
Dancer Dancer disposition
Yi Bao
Dancer AA
Hyun Hyun sound
easy to dance
Perfect Community
Dancer Dancer Rainbow
small dream
memory assistant
Dancer dream hanging (Leveling with G)
Dancer Dream Dancer hanging 
Union above benefit of the brush tool
sun
Dancer Dancer main
good Happy ( the old version)
nice Happy (new version)
Dancer hidden off
leaves Assistant
china Concert auxiliary
Hyun Dance child dance Hyun Hyun
purple
brother
Dancer Dancer Dancer conscience sound
storm
Dancer Dream Charm
Happy Dancer Dancer
Reds
perfect hasty (Speed ​​auxiliary do a)
Grand Trace Assistant - (do DNF patch)
peak
Dancer family
son Auxiliary (Auxiliary Speed ​​do a)
Kung Fu Panda
perfect rhythm
sister plug-in (three of the nightmare)
absolute flying (has stopped updating)
Tanabata dance dance melody
Flurry assistant
My Love Dancer
memories dance
Dancer family
Colorful
HE HE auxiliary
Dancer Eva
Dancer Binbin
ET answer
answer device
Want a dog
faites passer la souris sur chaque segment pour vous abonner avec ou des fils .
yahoo! newspaper intend des dizaines de fils rss que vous pouvez lire dans mon yahoo,occhiali da sole carrera! ou avec un agrégateur de fils tiers. cliquez ici gush en savoir and sur rss et son utilisation avec yahoo,lunettes vue chanel! actualités.