AWS Application Load Balancer : Request Header Or Cookie Too Large
Asked Answered
M

2

12

AWS's new Application Load Balancer is throwing an error : 400 Bad Request, Request Header Or Cookie Too Large, awselb/2.0

How do i increase the size in aws-elb. It was working fine with the classic load balancer.

Microsome answered 25/8, 2016 at 12:29 Comment(3)
You might have to open a ticket with AWS support regarding this issue.Delicatessen
Could you check that it is not the web server itself generating that error and passing it to the ELB? 400 level errors are most likely being generated by the web server and not the ELB eg 404 etc.Angers
We have nginx behind the elb. I have tried increasing the large_client_header_buffers in nginx. Plus there are no error logs or access logs on nginx when I get this error.Microsome
K
4

we spoken to aws about the same issue, we were sending a header request of a total of 33k, but one of our header ( authorization) size was 30 , but the limit ALB accepts for is as follows : - 16K per request line - 16K per single header - 64K for the entire header

Koph answered 9/2, 2018 at 15:23 Comment(0)
P
0

This 400 error is being generated by nginx. Now either it's your nginx or AWS ALB is using nginx behind the scenes.

I've encountered and resolved this before with nginx behind ALB by increasing the large_client_header_buffer in our nginx conf to 4 512k. If you have calculated the max size of your uri or cookies and it's within your large_client_header_buffer size then you'll have to raise a support ticket with AWS.

Precision answered 18/5, 2017 at 8:27 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.