热搜词
发表于 2009-6-22 19:25:55 | 显示全部楼层 |阅读模式
本帖最后由 灰儿 于 2009-6-22 19:29 编辑

因为,nginx和lighttpd的文档真的很少,更不用说中文文档了,所以收集一些和502有关的错误在这里,保留来源地址,建议看来源地址的内容。

502是FastCGI出现问题,所以从FastCGI配置入手。

1.请检查你的FastCGI进程是否启动

2.FastCGI进程不够使用
请通过执行 netstat -anpo | grep "php-cgi" | wc -l 判断,是否接近你启动的FastCGI进程,接近你的设置,表示进程不够


3.执行超时
请把
fastcgi_connect_timeout 300;
fastcgi_send_timeout 300;
fastcgi_read_timeout 300;
这几项的值调高

4.FastCGI缓冲不够
nginx和apache一样,有前端缓冲限制
请把
fastcgi_buffer_size 32k;
fastcgi_buffers 8 32k;
这几项的值调高

5.Proxy缓冲不够
如果你使用了Proxying,请把
proxy_buffer_size  16k;
proxy_buffers      4 16k;
这几项的值调高

6.https转发配置错误
正确的配置方法
        server_name www.mydomain.com;

        location /myproj/repos {

                set $fixed_destination $http_destination;
                if ( $http_destination ~* ^https(.*)$ )
                {
                    set $fixed_destination http$1;
                }

                proxy_set_header        Host $host;
                proxy_set_header        X-Real-IP $remote_addr;
                proxy_set_header        Destination $fixed_destination;
                proxy_pass              http://subversion_hosts;
        }

7.php脚本执行时间过长
将php-fpm.conf的<value name="request_terminate_timeout">0s</value>的0s改成一个时间
全部评论0
回复
您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|Archiver|手机版|小黑屋|管理员之家 ( 苏ICP备2023053177号-2 )

GMT+8, 2025-6-2 19:26 , Processed in 0.145992 second(s), 23 queries .

Powered by Discuz! X3.5

Cpoyright © 2001-2025 Discuz! Team