美文网首页
Nginx报 upstream timed out 10060

Nginx报 upstream timed out 10060

作者: 一梦三四年lyp | 来源:发表于2020-05-17 16:52 被阅读0次

    由于系统执行一个时间比较长的接口ngxin抛出下面的错误

      upstream timed out (10060: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond) while reading response header from upstream
    

    解决方法:
    1,修改fastcgi_read_timeout的参数值,系统默认60秒;
    2,fastcgi_read_timeout指定nginx接受后端fastcgi响应请求超时时间 (指已完成两次握手后nginx接受fastcgi响应请求超时时间)

            location ~ \.php(.*)$ {
                fastcgi_pass   127.0.0.1:9000;
                fastcgi_index  index.php;
                fastcgi_split_path_info  ^((?U).+\.php)(/?.+)$;
                fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
                fastcgi_param  PATH_INFO  $fastcgi_path_info;
                fastcgi_param  PATH_TRANSLATED  $document_root$fastcgi_path_info;
                fastcgi_read_timeout 600;
                include        fastcgi_params;
            }
    

    相关文章

      网友评论

          本文标题:Nginx报 upstream timed out 10060

          本文链接:https://www.haomeiwen.com/subject/abysohtx.html