zoukankan      html  css  js  c++  java
  • Nginx日常报错处理总结

    Nginx错误日志中,有大量的下列信息:

    Upstream timed out (110: Connection timed out) while reading response header from upstream

    [root@www vhosts]# tailf /usr/local/nginx/logs/qderp_error.log
    2018/10/31 02:05:39 [error] 12831#0: *149343 upstream timed out (110: Connection timed out) while reading response header from upstream, 
    2018/10/31 02:05:39 [error] 12831#0: *149341 upstream timed out (110: Connection timed out) while reading response header from upstream, 
    2018/10/31 02:05:39 [error] 12831#0: *149342 upstream timed out (110: Connection timed out) while reading response header from upstream, 
    2018/10/31 02:05:39 [error] 12831#0: *149340 upstream timed out (110: Connection timed out) while reading response header from upstream, 
    2018/10/31 02:05:39 [error] 12831#0: *149338 upstream timed out (110: Connection timed out) while reading response header from upstream,

    这种情况主要在下面两种情况下发生:

    1. nginx proxy

    需要适当的调整proxy_read_timeout值。

    location / {
            ...
            proxy_read_timeout 150;
            ...
        }

    2. Nginx作为php-fpm等等其他的有上游服务

    在这种情况下,适当的调整fastcgi_read_timeout选项值

    location ~* .php$ {
        include         fastcgi_params;
        fastcgi_index   index.php;
        fastcgi_read_timeout 150;
        fastcgi_pass    127.0.0.1:9000;
        fastcgi_param   SCRIPT_FILENAME    $document_root$fastcgi_script_name;
    }
  • 相关阅读:
    #define IOFFSETOF(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
    互联网地址处理例程
    Android系统工程模式启动过程详解
    知识填充
    git 本地回退
    理解JS中的Promise对象
    MySQL server version for the right syntax to use near 'identified
    尾递归要注意的点
    事件捕获和事件冒泡的理解
    v 2ra-y_build_a_sever_in_vltru
  • 原文地址:https://www.cnblogs.com/linuxk/p/9883503.html
Copyright © 2011-2022 走看看