Better logging message on header count exceeded#14915
Conversation
Signed-off-by: Pauline <pauline.lallinec@gmail.com>
Signed-off-by: Pauline <pauline.lallinec@gmail.com>
asraa
left a comment
There was a problem hiding this comment.
Change looks good to me! Let me know about that note, otherwise LGTM
| const absl::string_view header_type = | ||
| processing_trailers_ ? Http1HeaderTypes::get().Trailers : Http1HeaderTypes::get().Headers; | ||
| return codecProtocolError(absl::StrCat(header_type, " size exceeds limit")); | ||
| return codecProtocolError(absl::StrCat(header_type, " count exceeds limit")); |
There was a problem hiding this comment.
does this suffice for your use case? if you want the difference to show up in the response (as opposed to details in logging), error_code_ will be the response body. right now it is Http::Code::RequestHeaderFieldsTooLarge for both.
There was a problem hiding this comment.
That's an excellent remark. My use case is not on requests, though, it's for responses. Where we had a response from a server sending a whooping 116 headers, the error in Envoy showed up as (1) headers disconnect before response and (2) 503 Upstream Disconnect.
Only by increasing logging we could figure out that there were too many headers in the response, causing Envoy to terminate the connection.
There was a problem hiding this comment.
Ah! Thanks for the clarification.
Signed-off-by: Pauline <pauline.lallinec@gmail.com>
|
Could you please fix format? Otherwise LGTM |
|
@asraa ty; I have failing tests I need to fix; I've not been able to execute them locally yet and the test runner provided doesn't give much details as to why they're failing. I'll need to get back to it this week-end... |
Signed-off-by: Pauline <pauline.lallinec@gmail.com>
|
@asraa I ?think? the tests passed. Can you help me check whether the failures in the pipeline are related? I see 2 of them and Meanwhile the test I updated passed: and the (from this pipeline) If this is unrelated to the current PR, is it possible to re-run the test? [edit: found the kitty command to do it] If it is related, can you walk me through it? This is my first non-documentation PR in Envoy, please excuse the newbieness :-) |
|
/retest |
|
Retrying Azure Pipelines: |
|
Looking at the failed script, it has had a lot of failures recently with only 1 out of 5 pipeline being successful. I can see on a successful pipeline, it does: While on mine and others, it does: This seems to be an IO error unrelated to the current work. What can I do about it? |
|
/retest |
|
Retrying Azure Pipelines: |
|
/retest |
|
Retrying Azure Pipelines: |
|
Hmm thanks @plallin for re-running! I think verify-examples has been flakey, and those are most likely unrelated to your code since it's just the log message changed.
For running locally (assuming there's enough space to build), check out https://github.com/envoyproxy/envoy/blob/17e815122ff53d0ac6cb2d64cdbf1bfc547bb7e8/bazel/README.md#testing-envoy-with-bazel once you've gone through the quick start. I'll keep an eye on verify-examples. |
|
@asraa Thanks! I've been able to run the test locally since; unfortunately my personal computer isn't optimised for development and I run into an OOM. I can probably configure Bazel to not use as much memory, but that's a problem for a future PR :-) I have checked other PRs here, they run in the same issue with verify-examples, see here for example |
|
/retest |
|
Retrying Azure Pipelines: |
…unt-log Signed-off-by: Pauline <pauline.lallinec@gmail.com>
…unt-log Signed-off-by: Pauline <pauline.lallinec@gmail.com>
|
Thanks! @envoyproxy/senior-maintainers can you please merge this PR? It changes log messages in the H/1 codec |
Signed-off-by: Pauline pauline.lallinec@gmail.com
For an explanation of how to fill out the fields, please see the relevant section
in PULL_REQUESTS.md
Commit Message: Better error message on header count exceeded
Additional Description: The header size and header count limit exceeded is the same message "header size exceeded". This PR clarifies the case when header count is exceeded.
Risk Level: low
Testing: unit tests updated
Docs Changes: n/a
Release Notes: n/a
Platform Specific Features: n/a