Welcome! Log In Create A New Profile

Advanced

How to avoid "too big header" issue?

April 21, 2011 07:02AM
There's hundreds of "setcookie('xxx','yyy')" lines in one of my php page,the size of these cookies is about 2-10KB,so nginx always throw a typical "502 bad gateway".

my solutionA is: add this to nginx.conf:

client_header_buffer_size 8m;
large_client_header_buffers 8 8m;
fastcgi_buffer_size 8m;
fastcgi_buffers 8 8m;

result:no effect. I tried increasing the size from 8m to 128m,but it still give me a 502 errror.


and solution B:

fastcgi_ignore_headers Set-Cookie;

result:no effect. In error log,there's still a large amount of 'Set-Cookie' header info:

2011/04/21 18:28:10 [debug] 66257#0: *2 http fastcgi header: "Set-Cookie: xxx=yyy; expires=Wed, 21-Apr-2010 10:28:09 GMT"
............
............
2011/04/21 18:28:10 [debug] 66257#0: *2 http fastcgi parser: -2
2011/04/21 18:28:10 [debug] 66257#0: *2 upstream split a header line in FastCGI records
2011/04/21 18:28:10 [error] 66257#0: *2 upstream sent too big header while reading response header from upstream..........
Subject Author Posted

How to avoid "too big header" issue?

stalkercn April 21, 2011 07:02AM

Re: How to avoid "too big header" issue?

Igor Sysoev April 22, 2011 02:36AM

Re: How to avoid "too big header" issue?

stalkercn April 26, 2011 08:46PM

Re: How to avoid "too big header" issue?

stalkercn April 28, 2011 11:15PM

Re: How to avoid "too big header" issue?

stalkercn May 03, 2011 11:10PM

Re: How to avoid "too big header" issue?

Igor Sysoev May 04, 2011 02:28AM

Re: How to avoid "too big header" issue?

stalkercn May 04, 2011 10:50PM

Re: How to avoid "too big header" issue?

Igor Sysoev May 05, 2011 03:36AM

Re: How to avoid "too big header" issue?

stalkercn May 05, 2011 10:45PM

Re: How to avoid "too big header" issue?

Igor Sysoev May 06, 2011 12:44AM

Re: How to avoid "too big header" issue?

stalkercn May 06, 2011 02:34AM

Re: How to avoid "too big header" issue?

stalkercn May 06, 2011 02:52AM

Re: How to avoid "too big header" issue?

stalkercn May 06, 2011 03:22AM

Re: How to avoid "too big header" issue?

stalkercn May 06, 2011 04:02AM

Re: How to avoid "too big header" issue?

Igor Sysoev May 06, 2011 02:44AM

Re: How to avoid "too big header" issue?

Igor Sysoev May 06, 2011 03:00AM

Re: How to avoid "too big header" issue?

Igor Sysoev May 06, 2011 03:40AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 219
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready