May 4

Nginx 502 Bad Gateway错误问题收集 多云

碟舞飞扬 , 21:56 , 服务器类 , 评论(0) , 引用(0) , 阅读(2193) , Via 本站原创 | |
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的0s的0s改成一个时间。
Tags: ,
发表评论

昵称

网址

电邮

打开HTML 打开UBB 打开表情 隐藏 记住我 [登入] [注册]