-
Notifications
You must be signed in to change notification settings - Fork 29.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Running benchmark/http/headers.js
fails with HPE_HEADER_OVERFLOW
#31022
Comments
The benchmark succeeds if I install $ node -v
v12.14.0
$ npm install -g autocannon
/home/trivikr/.nvm/versions/node/v12.14.0/bin/autocannon -> /home/trivikr/.nvm/versions/node/v12.14.0/lib/node_modules/autocannon/autocannon.js
+ [email protected]
added 41 packages from 70 contributors in 1.456s
$ node benchmark/http/headers.js
http/headers.js len=1 n=10 benchmarker="autocannon": 42,550.4
http/headers.js len=100 n=10 benchmarker="autocannon": 16,156
http/headers.js len=1 n=1000 benchmarker="autocannon": 1,933.4
http/headers.js len=100 n=1000 benchmarker="autocannon": 2,021.8 Should we improve the error code if |
|
What should be done here? |
More than two years ago, for security/reliability purposes, the default maximum header size was reduce from 80Kb to 8192 bytes. We can either reduce the size of the benchmark so it fits inside the default or else pass the --max-http-header-size flag to the child process. I think reducing the size of the benchmark probably makes sense. It seems like headers about 8192 bytes are an edge case with some valid uses but not something we necessarily want to be optimizing for. |
Proposed fix in #36794 |
The http/headers.js benchmark fails if wrk or autocannon are not installed. This is because the benchmark exceeds the default permissible length for HTTP headers. Reduce the largest benchmarks to fit within the 8192 default as that is what we should be optimizing for. Fixes: #31022 PR-URL: #36794 Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Juan José Arboleda <[email protected]> Reviewed-By: Anto Aravinth <[email protected]>
The http/headers.js benchmark fails if wrk or autocannon are not installed. This is because the benchmark exceeds the default permissible length for HTTP headers. Reduce the largest benchmarks to fit within the 8192 default as that is what we should be optimizing for. Fixes: #31022 PR-URL: #36794 Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Juan José Arboleda <[email protected]> Reviewed-By: Anto Aravinth <[email protected]>
Describe the bug
Running
benchmark/http/headers.js
fails withHPE_HEADER_OVERFLOW
for:To Reproduce
Follow instructions in running benchmarks to run
benchmark/http/headers.js
Example:
Expected behavior
The
benchmark/http/headers.js
runs without any errorAdditional context
I came across this issue as part of running benchmarks while moving to
for...of
loop in the initial commits of #30958The text was updated successfully, but these errors were encountered: