zoukankan      html  css  js  c++  java
  • nginx proxy超时报错 upstream timed out (110: Connec...

     

    环境介绍 
    服务器:centos6.4
    服务:nginx proxy

    问题描述:

    然后查找  /opt/usr/nginx/1.4.0/logs  错误 error.log日志提示如下

    2015/01/04 15:44:13 [error] 10112#0: *994662 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 117.32.232.172, server: localhost, request: "POST /community-platform/datastatistics/datastatistics_exportAllUserDataDetail.action HTTP/1.1", upstream: "http://10.172.11.194:9080/community-platform/datastatistics/datastatistics_exportAllUserDataDetail.action", host: "admin.zhsqcn.com", referrer: "http://admin.zhsqcn.com/community-platform/datastatistics/datastatistics_communityStatistics.action?leftPid=98"
    2015/01/04 15:45:22 [info] 10112#0: *994692 client closed connection while waiting for request, client: 117.32.232.172, server: 0.0.0.0:80

    2015/01/04 15:57:10 [info] 10112#0: *994707 client 1.85.57.66 closed keepalive connection
    2015/01/04 15:57:19 [info] 10112#0: *994711 client 1.85.57.66 closed keepalive connection
    2015/01/04 15:57:19 [info] 10112#0: *994718 client closed connection while waiting for request, client: 1.85.57.66, server: 0.0.0.0:80

    解决方法:vi  /opt/usr/nginx/1.4.0/conf/nginx.conf
    原因在于nginx proxy的超时时间太短
    proxy_connect_timeout    3;
    proxy_read_timeout       30;
    proxy_send_timeout       30;

    更改为

    proxy_connect_timeout    600;
    proxy_read_timeout       600;
    proxy_send_timeout       600;

    然后重启nginx即可:

    /opt/usr/nginx/1.4.0/sbin/nginx -s reload

  • 相关阅读:
    MVC各部分技术体现
    SSM框架——详细整合教程(Spring+SpringMVC+MyBatis)
    my SQL Workbench创建数据库
    哪些素质很重要,却是读书学不来
    给程序员最好的18个忠告!
    互联网协议入门(二)
    互联网协议入门(一)
    div+css命名规范大全
    javascript中this的用法
    XHTML 相对路径与绝对路径
  • 原文地址:https://www.cnblogs.com/williamjie/p/10218196.html
Copyright © 2011-2022 走看看