Skip to content

Log level of "premature response" messages #6636

@oschaaf

Description

@oschaaf

While reproducing #5536, I observed
Nighthawk to emit log lines like this pretty rapidly in succession:

...
[16:03:40.642461][6747][I] [external/envoy/source/common/http/codec_client.cc:122] [C46] premature response
[16:03:40.642526][6747][I] [external/envoy/source/common/http/codec_client.cc:122] [C45] premature response
[16:03:40.642586][6747][I] [external/envoy/source/common/http/codec_client.cc:122] [C44] premature response
...

This happened when proxying through HAProxy which in turn talks to a stock nginx which servers a static file. (For context, more information and configurations over at https://gist.github.com/oschaaf/a04a1d4a9fa3b571ad80ba2449761616)

I dug into that, and after reading the code I concluded that because the protocol error stat isn't bumped, this may happen when a Connection:close header is observed. In that particular case, it may be good to downgrade the log level, because this may happen quite frequently. That might impact performance negatively. (And cause jitter in Nighthawk as it re-uses the same code :-))

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions