-
Notifications
You must be signed in to change notification settings - Fork 757
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
[classlib] increase maxAttempts for tcp connection to the server #4481
[classlib] increase maxAttempts for tcp connection to the server #4481
Conversation
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.
Thanks!
I would rather see your explanation for this change in a comment in the code and/or in the commit message, so that it's preserved in the codebase.
On my system supernova takes about 1.8s to respond to the tcp connection (~8 connection attempts) when the system is idle. When I stress my system, the server often boots after we run out of connection attempts (supernova responds after more than 2 seconds).
Is this in a release or debug build?
|
6defa47
to
e02a004
Compare
e02a004
to
cc5d033
Compare
I've added the comment in the code, is this OK? |
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.
LGTM, thanks!
@joshpar are you planning to review this anytime soon? |
@joshpar feel free to look this over if you're still interested |
Purpose and Motivation
Tested on macOS 10.13.
In the process of testing #4435, I realized that supernova takes considerably more time to boot than scsynth, which is a problem with we wait for the tcp connection to be established.
NetAddr -tryConnectTCP
, called byServer -boot
by default makes a maximum of 10 attempts every 0.2s, and then says that the connection failed. That means that the server needs to respond within 2 seconds.On my system supernova takes about 1.8s to respond to the tcp connection (~8 connection attempts) when the system is idle. When I stress my system, the server often boots after we run out of connection attempts (supernova responds after more than 2 seconds).
This PR increases number of connection attempts to 20, in practice giving server 4 seconds to respond. It is a workaround (not a fix) for #4483.
Types of changes
To-do list