-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
connmgr: reduce log level for closing connections #2165
Conversation
I'd argue that the |
p2p/net/connmgr/connmgr.go
Outdated
@@ -173,7 +173,7 @@ func (cm *BasicConnMgr) memoryEmergency() { | |||
|
|||
// Trim connections without paying attention to the silence period. | |||
for _, c := range cm.getConnsToCloseEmergency(target) { | |||
log.Infow("low on memory. closing conn", "peer", c.RemotePeer()) | |||
log.Debugw("low on memory. closing conn", "peer", c.RemotePeer()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This definitely shouldn't be hidden as debug. Running low on memory is a pretty serious condition.
@@ -375,7 +375,7 @@ func (cm *BasicConnMgr) doTrim() { | |||
func (cm *BasicConnMgr) trim() { | |||
// do the actual trim. | |||
for _, c := range cm.getConnsToClose() { | |||
log.Infow("closing conn", "peer", c.RemotePeer()) | |||
log.Debugw("closing conn", "peer", c.RemotePeer()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This one is fine.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you sure it's debug? Look at this:
admin@node-01.sm-eu-zur1.spiff.app-test:~ % ls -lh /var/log/docker/spiff-workflow-wakunode/docker.log
-rw-r--r-- 1 syslog syslog 13G Mar 2 13:13 /var/log/docker/spiff-workflow-wakunode/docker.log
admin@node-01.sm-eu-zur1.spiff.app-test:~ % grep 'closing conn' /var/log/docker/spiff-workflow-wakunode/docker.log | wc -l
57729782
This is from 1.5 day of not really that active of a node. If you have a trace level it should be trace.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we have a trace log level. Or if we do, we don't use it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fair enough.
23d2ca5
to
917cec1
Compare
This PR changes the log level for closing connections in connmgr.go from INFO to DEBUG, since as reported in status-im/status-go#3249 these logs add too much noise.