upstream timed out 的修改方案

服务器前端加入反向代理 Nginx 后,用户下载生成的Excel表格时候报错,

An error occurred.

Sorry, the page you are looking for is currently unavailable.

 Please try again later.

If you are the system administrator of this resource then you should check the error log for details.

Faithfully yours, nginx.

  生成的时间比较长,说有5分钟,

   我检查 Nginx的错误日志,发现 : 

          upstream timed out .......错误

        大致意思是和后面的web服务器连接时候,读取数据超时了。

         修改方案:

            proxy_connect_timeout 900;  #nginx跟后端服务器连接超时时间(代理连接超时)

          proxy_send_timeout 900;        #后端服务器数据回传时间(代理发送超时)

          proxy_read_timeout 900;         #连接成功后,后端服务器响应时间(代理接收超时)

               

 这个应该可以了。

        

猜你喜欢

转载自guanxi.iteye.com/blog/2253020
今日推荐