-
Notifications
You must be signed in to change notification settings - Fork 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
Add Goodbye Message When Disconnecting With Peers #5589
Conversation
beacon-chain/p2p/handshake.go
Outdated
} | ||
go func() { | ||
log.WithField("reason", "at peer limit").Trace("Ignoring connection request") | ||
if err := goodbyeFunc(context.Background(), 2, conn.RemotePeer()); err != nil { |
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.
can we please name "2" what is this code?
My topaz prysm testnet node (on debug log level) has logged hundreds of thousands of lines over the past days, most of which are level=debug msg="Sending Goodbye message to peer" Reason="fault/error" peer=16Uiu2HAm4TsWtLtCmsS4szLRUacQiNFVAcJxZPHjPiDS9XnHLRC6 prefix=sync (with different peer IDs). Also getting a lot "Failed to decode goodbye stream message" error="stream reset" peer=16Uiu2HAm7XYQgKi27yjvd1G433rJJzpCyrKvzbjeE54DA4n8y6FP prefix=sync topic="/eth2/beacon_chain/req/goodbye/1/ssz_snappy" Also, the "failed to decode goodbye" sometimes logs up to 8 times, the exact same Logs excerpt (literally hundreds of thousands of lines of logs, can't share it all, but you get the idea): https://gist.github.com/protolambda/a087de4f44a03deeff0c2a78f50c07ca Can it be that this functionality is horribly broken in some unexpected way? |
4 days of running in debug mode:
That's a lot of log messages... |
Are you at max peers? You'll kick anyone that tries to connect to you if you have max peers and they are probably retrying anyway. |
Seeing this often in prod too. @nisdas It may be logging too much or sending multiple good bye to the same peer. |
At max peers yes, around 100 (changed upwards from default). docker image 9a7fbadca570, commit 2eac24c |
Still, if that's max-peers, and it logs goodbye because of failed connect, then that's almost 800.000 connection attempts to my node in 4 days. So maybe the goodbye code is correct, but the connection attempts are way too much. |
Confirmed we are logging more than once per peer. Possibly sending multiple goodbye messages. Some peers logging as much as 50+ on a single node. Graph link for @nisdas https://kibana.prylabs.network/goto/873081efd6a6753438a9e8f253e6fd1a |
Even at 50 per peer, that's 16000 connection attempts, over 4 days |
Resolves #4814
cc @q9f , @AgeManning