# HTTP/2 max header size

**URL:** <https://www.ruby-forum.com/t/http-2-max-header-size/243923>\
**Category:** NGINX\
**Created:** [January 26, 2016, 8:15am UTC](https://www.ruby-forum.com/t/http-2-max-header-size/243923 "2016-01-26T08:15:22Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sadaf\_N](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/858c86/32.png) [@Sadaf\_N](https://www.ruby-forum.com/u/Sadaf_N)\
**Post date:** [January 26, 2016, 8:15am UTC](https://www.ruby-forum.com/t/http-2-max-header-size/243923/1 "2016-01-26T08:15:22Z")

</div>

Hi,

I was using “nghttp” command line tool to test NGINX. I enabled  
“continuation” option in “nghttp” command line tool, which filled the  
HEADERS frame with a very large header field/value. Then I got an GOAWAY  
frame with error code of “ENHANCE\_YOUR\_CALM(0x0b)”. Then I checked the  
debug log file of the server, and found “client exceeded  
http2\_max\_header\_size limit while processing HTTP/2 connection”.

May I know the consideration about this limitation? For a client, it may  
not be able to know the precise value of “http2\_max\_header\_size”. Once a  
client gets this error, how can it recover from it or request the  
resource  
successfully?

Thanks!

Shengtuo Hu

---

<div class="post-metadata">

**Author:** ![Shengtuo\_Hu](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/49beb7/32.png) [@Shengtuo\_Hu](https://www.ruby-forum.com/u/Shengtuo_Hu)\
**Post date:** [January 26, 2016, 12:48pm UTC](https://www.ruby-forum.com/t/http-2-max-header-size/243923/2 "2016-01-26T12:48:12Z")

</div>

On Tuesday 26 January 2016 15:14:04 Shengtuo Hu wrote:

> not be able to know the precise value of “http2\_max\_header\_size”.  
> Decompression and processing of headers require proportional amount of  
> memory.  
> The consideration is simple: to limit the amount of memory that can be  
> eaten by  
> a client and prevent DoS attack on the server.

> Once a client gets this error, how can it recover from it or request  
> the resource successfully?

[..]

If a client gets this error then either it is doing something wrong by  
sending  
incorrect requests, or the server is configured incorrectly.

wbr, Valentin V. Bartenev
