hjuskewycz
hjuskewycz

Reputation: 1437

Nginx Request header Or Cookie Too Large

I am trying to setup Nginx + Unicorn + Rails 3. Nginx will also serve some static and php projects. However when I open the site I always see a

400 Bad Request
Request Header Or Cookie Too Large

error page. Nothing in the access nor error logs.

/etc/nginx

nginx.conf https://gist.github.com/1117152

php.conf https://gist.github.com/1117154

drop.conf https://gist.github.com/1117158

/etc/nginx/sites-enabled

https://gist.github.com/1117161

I am pretty stuck here because I don't see anything in logs.

Upvotes: 4

Views: 7701

Answers (3)

edelwater
edelwater

Reputation: 2802

This came high up on Google so to save time for people in the same situation:

I included the JavaScript FB_Init (Facebook) on a page and had the "cookie=true" which produced an amazingly big cookie. Turning this to false was the solution and resolved the identical message.

Upvotes: 0

Dennis C
Dennis C

Reputation: 24747

Check your "large_client_header_buffers". You might need to use a larger value if your application require

Upvotes: 3

hjuskewycz
hjuskewycz

Reputation: 1437

hmm of course it's the users fault. I had a wrong references to the socket in the site-available conf and an endless loop was the result. I fixed it in the gist.

Upvotes: 3

Related Questions