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

Make agent connect timeout less aggressive #1816

Merged
merged 1 commit into from
Sep 1, 2020

Conversation

bantonsson
Copy link
Contributor

Reported repeated failures to probe the agent endpoints because of too low connect timeout.

@bantonsson bantonsson requested a review from a team as a code owner August 31, 2020 16:09
@bantonsson bantonsson self-assigned this Aug 31, 2020
try (Socket socket = new Socket()) {
socket.setSoTimeout(CONNECT_TIMEOUT_MS);
socket.connect(new InetSocketAddress(host, port));
socket.connect(new InetSocketAddress(host, port), (int) timeoutMillis);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Actually use the timeout when trying to connect.

if (null == detectedVersion) {
log.debug("Tried all of {}, no connectivity to datadog agent", endpoints);
if (null == detectedVersion && log.isDebugEnabled()) {
log.debug("Tried all of {}, no connectivity to datadog agent", Arrays.asList(endpoints));
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This only logged the first element of the endpoints array.

Copy link
Member

Choose a reason for hiding this comment

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

This is shameful :(

@bantonsson bantonsson merged commit 1e6dd58 into master Sep 1, 2020
@bantonsson bantonsson deleted the ban/make-agent-connect-timeout-less-aggressive branch September 1, 2020 06:08
@github-actions github-actions bot added this to the 0.62.0 milestone Sep 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants