zoukankan      html  css  js  c++  java
  • an upstream response is buffered to a temporary file

    Solution 1:

    1) How can I remove the [warn] and avoid buffering responses? Is it better to turn off proxy_buffering or set proxy_max_temp_file_size to 0? Why?

    You should set proxy_max_temp_file_size to 0 in order to remove it. The proxy_buffering directive isn't directly related to the warning. You can switch it off to stop any buffering at all but that isn't recommended in general (unless it's needed for Comet).

    2) If nginx buffers a response when does it serve the buffered response, to whom and why?

    It servers immediately, but a client usually has much slower connection and can't consume the response data as fast as it produced by your application. Nginx tries to buffer the whole response in order to release your application ASAP.

     

    See also: http://aosabook.org/en/nginx.html

    3) Why nginx turns proxy_buffering on by default and then [warn]s you if it actually buffers a response?

    As I already mentioned, the proxy_buffering isn't directly related to the warning. It's generally needed for optimized proxy operations and turning it off degrades performance and throughput.

    Nginx only warns you when a response doesn't fit into configured memory buffers. You may ignore the warning if it's ok for you.

    4) When does a response triggers that option? When it takes > than some seconds (how many?) to serve the response? Is this configurable?

    It triggers when memory buffers are full. Please, look at the docs, the whole mechanism is explained: http://nginx.org/r/proxy_max_temp_file_size

    You may want to increase memory buffers.

    Solution 2:

    The following configuration works fine on my server.

    proxy_buffers 16 16k;  
    proxy_buffer_size 16k;
  • 相关阅读:
    css div中加入滚动条
    oracle创建表主键触发器
    SQL Server 日志满的处理方法(转)
    Asp.net 设置页面自动刷新
    设置DataGrid可读取中隐藏列数据
    用JavaScript获取Asp.net服务器端控件CheckBoxList的选中值数组(转)
    AutoLISP查询椭圆的相关属性
    AutoLISP查询圆弧的相关属性
    关于性格内向者的10个误解
    AutoLISP查询图元信息
  • 原文地址:https://www.cnblogs.com/weifeng1463/p/15609071.html
Copyright © 2011-2022 走看看