Skip to content

Conversation

@soloestoy
Copy link
Contributor

@soloestoy soloestoy commented May 6, 2023

Users can record logs of different levels by setting the loglevel. However, sometimes there are many logs even at the warning level, which can affect the performance of Redis.

For example, when a user accesses the tls-port using a non-encrypted link, Redis will log lots of "# Error accepting a client connection: ...".

We can provide the ability to disable logging so that users can temporarily turn off logging and turn it back on after the problem is resolved.

@oranagra
Copy link
Member

oranagra commented May 7, 2023

i'm not certain about it.
it's probably safe to add, although there's a chance it'll get abused.

but it might also not be very beneficial (log can already explode by the time someone finds the problem).
i think the better solution is to reduce the log level of that error print, or better yet, add some throttling mechanism to our logging.

@yossigo @madolson WDYT?

@madolson
Copy link
Contributor

madolson commented May 7, 2023

I'm inclined to add this nothing config as well as go through the warnings and make sure they are all really warnings.

Copy link
Contributor

@enjoy-binbin enjoy-binbin left a comment

Choose a reason for hiding this comment

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

agree with madolson
for the record, we checked some WARNING logs earlier and downgraded it to NOTICE. in #10715

@yossigo
Copy link
Collaborator

yossigo commented May 9, 2023

I also support addressing the root cause rather than providing a kill switch as a workaround.

@soloestoy
Copy link
Contributor Author

it's necessary to check the wrong logs level, but my main idea is we need a log switch, if the nothing log level is unclear, I'm ok to add a new config like serverlog-enabled to control it.

@hwware hwware closed this May 9, 2023
@hwware hwware reopened this May 9, 2023
@madolson
Copy link
Contributor

I also support addressing the root cause rather than providing a kill switch as a workaround.

I'll also add that we operationally could have used a kill-switch as a work around when we added a log as a warning thinking it was an uncommon case but turned out to be logged extensively in certain operational events. The overhead of the config is really small, and it's not a useless operational tool.

Co-authored-by: Madelyn Olson <34459052+madolson@users.noreply.github.com>
@oranagra
Copy link
Member

discussed in core-team meeting.
we feel like the problem isn't really solved and some log throttling mechanism is needed, but it doesn't mean this PR isn't ok on it's own. approved!

@oranagra oranagra changed the title add a new loglevel 'nothing' to close log add a new loglevel 'nothing' to disable logging May 23, 2023
@oranagra oranagra merged commit 07ea220 into redis:unstable May 23, 2023
@oranagra oranagra added the release-notes indication that this issue needs to be mentioned in the release notes label May 23, 2023
enjoy-binbin added a commit to enjoy-binbin/redis that referenced this pull request May 24, 2023
We add a new loglevel 'nothing' to disable logging in redis#12133.
This PR syncs that config change to sentinel. Because in redis#11214
we support modifying loglevel in runtime.

Although I think sentinel doesn't need this nothing config,
it's better to be consistent.
oranagra pushed a commit that referenced this pull request May 24, 2023
We add a new loglevel 'nothing' to disable logging in #12133.
This PR syncs that config change to sentinel. Because in #11214
we support modifying loglevel in runtime.

Although I think sentinel doesn't need this nothing config,
it's better to be consistent.
@oranagra oranagra mentioned this pull request Jul 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release-notes indication that this issue needs to be mentioned in the release notes

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

6 participants