Skip to content

Conversation

@himanshug
Copy link
Contributor

Unfortunately #5057 did not solve the problem mentioned in #4973 (comment) .

I did some more investigation and found that non-daemon thread actually comes from https://github.com/AsyncHttpClient/async-http-client/blob/async-http-client-project-2.0.37/client/src/main/java/org/asynchttpclient/DefaultAsyncHttpClient.java#L93 .

this patch overrides that timer to be exactly same except for using daemon threads. I tested it on my dev environment and problem appears to be solved.

For example, when I run druid code without this patch with Http emitter enabled, then I can see (in thread dump) non-daemon thread with name similar to "pool-39-thread-1" and with this patch those don't exist and I see daemon threads with name like "HttpPostEmitter-AsyncHttpClient-Timer-0" instead .

I'll test it more on some environments, but I think this fixed the issue.

@himanshug himanshug added the Bug label Nov 10, 2017
@himanshug himanshug added this to the 0.11.0 milestone Nov 10, 2017
Copy link
Member

@pjain1 pjain1 left a comment

Choose a reason for hiding this comment

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

👍

Copy link
Contributor

@gianm gianm left a comment

Choose a reason for hiding this comment

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

👍 thanks for tracking it down @himanshug

@pjain1 pjain1 merged commit 1c64f02 into apache:master Nov 11, 2017
@pjain1
Copy link
Member

pjain1 commented Nov 11, 2017

may be backport ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants