Skip to content

io: reduce unknown error code log level#7750

Merged
mattklein123 merged 1 commit intomasterfrom
socket_log_level
Jul 31, 2019
Merged

io: reduce unknown error code log level#7750
mattklein123 merged 1 commit intomasterfrom
socket_log_level

Conversation

@mattklein123
Copy link
Copy Markdown
Member

2019-07-29T17:11:16.00568 [2019-07-29 17:11:16.005][26039][error][misc] [external/envoy/source/common/network/io_socket_error_impl.cc:29] Unknown error code 111 details Connection refused

I saw the previous log line on a production box and I think this should
be a debug log condition.

Risk Level: Low
Testing: Existing tests
Docs Changes: N/A
Release Notes: N/A

```
2019-07-29T17:11:16.00568 [2019-07-29 17:11:16.005][26039][error][misc] [external/envoy/source/common/network/io_socket_error_impl.cc:29] Unknown error code 111 details Connection refused
```

I saw the previous log line on a production box and I think this should
be a debug log condition.

Signed-off-by: Matt Klein <mklein@lyft.com>
@danzh2010
Copy link
Copy Markdown
Contributor

I'm fine with either logging levels, but shouldn't ECONNREFUSED be an error you want to propagate to the application? If so, instead of decrease the log level, we should add such error code to the enum.

@mattklein123
Copy link
Copy Markdown
Member Author

I don't actually know where this is coming from, I just thought it doesn't make sense to have this be an error log since it might heavily spam the logs?

@danzh2010
Copy link
Copy Markdown
Contributor

I don't actually know where this is coming from, I just thought it doesn't make sense to have this be an error log since it might heavily spam the logs?

This IO error is not affected by input. So it shouldn't spam the logs if upper level handles it appropriately, i.e. no un-limited number of retries.

@mattklein123
Copy link
Copy Markdown
Member Author

This IO error is not affected by input. So it shouldn't spam the logs if upper level handles it appropriately, i.e. no un-limited number of retries.

Ultimately I agree, but I still think it's safer to reduce the log level here and we can deal with unhandled cases as they come up?

@danzh2010
Copy link
Copy Markdown
Contributor

This IO error is not affected by input. So it shouldn't spam the logs if upper level handles it appropriately, i.e. no un-limited number of retries.

Ultimately I agree, but I still think it's safer to reduce the log level here and we can deal with unhandled cases as they come up?

SGTM

Copy link
Copy Markdown
Contributor

@alyssawilk alyssawilk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Optional: I'd lean towards just adding econnrefused to the known errors, and continuing to log things we don't expect at error level, but this is a viable fix too.

@mattklein123
Copy link
Copy Markdown
Member Author

I'm going to land this and we can look at what/where is dealing with conn refused and also that. I just think this is too high of a risk of log spam by accident.

@mattklein123 mattklein123 merged commit 853547c into master Jul 31, 2019
@mattklein123 mattklein123 deleted the socket_log_level branch July 31, 2019 16:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants