title: Nginx upstream sent too big header while reading response header from upstream
body: <p>I get error like this:</p>
  
  <pre><code>[error] 27544#0: *47335682 upstream sent too big header while reading response 
   header from upstream, client: 88.88.88.88, server: example..com,
   request: "POST /tool/ HTTP/1.1", upstream: "http://88.88.88.88:7080/tool/",
   host: "example.com"
  </code></pre>
  
  <p>Regarding to this question, it is possible to increase buffer size from nginx conf file like this: <a href="https://stackoverflow.com/questions/23844761/upstream-sent-too-big-header-while-reading-response-header-from-upstream">upstream sent too big header while reading response header from upstream</a></p>
  
  <pre><code>http {
    proxy_buffer_size   128k;
    proxy_buffers   4 256k;
    proxy_busy_buffers_size   256k;
  }
  
  location
        fastcgi_buffers 16 16k; 
        fastcgi_buffer_size 32k;
  </code></pre>
  
  <p>(For future reference, default size for fastcgi_buffer_size and fastcgi_buffers  is 4k or 8k, regarding to platform)</p>
  
  <p>This text appears in user's browser: <code>Nginx 502 Bad Gateway</code></p>
  
  <p>I'm planning to temporarily increase buffer size. Then I can log when the buffers are too big. Is it possible to find out headers which is too big for upstream ? apache_response_headers() and headers_list() didn't give me all response headers. It only gave me expires, cache-control and pragma headers.</p>
  
  <p>Does changing proxy_buffer_size makes a performance problem ?</p>
  
  <p>(nginx version: nginx/1.6.0, php 5.4.42, xcache 3.2)</p>