Skip to content
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

socket.setKeepAlive(true) can send massive [TCP Keep-Alive] messages #24689

Closed
betimer opened this issue Nov 28, 2018 · 2 comments
Closed

socket.setKeepAlive(true) can send massive [TCP Keep-Alive] messages #24689

betimer opened this issue Nov 28, 2018 · 2 comments
Labels
net Issues and PRs related to the net subsystem. wontfix Issues that will not be fixed.

Comments

@betimer
Copy link

betimer commented Nov 28, 2018

  • Version: 8.9.1 (But it also happens on 10.14.0)
  • Platform: Windows Server
  • Subsystem: 2012 R2

socket.setKeepAlive(true, 3000) works fine, which will create tcp connection every 3 seconds

The issue is socket.setKeepAlive(true), if do not put delay millisecond parameter (which is default 0), it, however sends 290 keep alive message in every second.

Another finding is that, the default massive keep alive message does not happen on my personal laptop (So it only happens on production server)

@betimer betimer changed the title socket.setKeepAlive(true) can send massive keep alive messages socket.setKeepAlive(true) can send massive [TCP Keep-Alive] messages Nov 28, 2018
@apapirovski
Copy link
Member

@betimer you're setting the delay to 0 so it'll just send it as often as it can — this works as expected. I'm going to close this out as I don't really see anything that we can do to change this. As far as I can see this is even documented.

@apapirovski apapirovski added wontfix Issues that will not be fixed. net Issues and PRs related to the net subsystem. labels Nov 29, 2018
@betimer
Copy link
Author

betimer commented Nov 29, 2018

Hi @apapirovski
I can see 2 different behaviour on Window Server 2012 and my personal Win 10.

On Window Server 2012, it sends averagely 290 keep alive messages (I can check from wireshark)

But on my personal PC, I cannot see it sending the keep alive message.

So I believe there is localize logic to execute in node based on different local OS environment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
net Issues and PRs related to the net subsystem. wontfix Issues that will not be fixed.
Projects
None yet
Development

No branches or pull requests

2 participants