502 Bad Gateway w/ Large Headers

Igor Sysoev is at rambler-co.ru
Fri Oct 24 00:11:44 MSD 2008


On Thu, Oct 23, 2008 at 01:15:06PM -0500, Clint Priest wrote:

>    If I set this to a very large value, such as 128k does it allocate
>    this for every connection or only as needed?  This really only needs
>    to be large for debugging purposes.

Yes, the proxy_buffer_size is allocated for every connections,
but proxy_buffers are allocated on demand only.

>    Clint Priest wrote:
> 
>    That did it, thanks!
>    Igor Sysoev wrote:
> 
> On Thu, Oct 23, 2008 at 10:36:11AM -0500, Clint Priest wrote:
> 
>   
> 
> I'm trying out this software FirePHP which is an out-of-band error 
> logging that works with PHP and Firebug. 
> 
> With nginx setup as a load balancer, whenever large headers are being 
> passed back (from FirePHP) it causes nginx to send back a 502 Bad 
> Gateway message.
> 
> Here are the headers being sent (I received these by going around the 
> load balancer directly to the web server behind nginx).
>     
> 
> If you use proxying, then try something like
> 
>     proxy_buffer_size  16k;    # this is for header and first body part
>     proxy_buffers      4 16k;
> 
> 
>   

-- 
Igor Sysoev
http://sysoev.ru/en/





More information about the nginx mailing list