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

Threads are not getting cleaned up after processor stops #385

Open
pramakrishn opened this issue Feb 16, 2023 · 0 comments
Open

Threads are not getting cleaned up after processor stops #385

pramakrishn opened this issue Feb 16, 2023 · 0 comments

Comments

@pramakrishn
Copy link

Hi, it looks like the threads are not cleaned after the processor stops.

I created 5 different Nakadi clients, each with maxRetryAttempts set to 2 and started the processes. They are made to fail by having another client(another process) use the same subscription. I saw that the onStop() method was called 5 times after processor was shutdown.

When I printed the thread dump after r

for (Thread t : ThreadUtils.getAllThreads()) {
    System.out.println(t.getName() + ", " + t.getState().name());
}

I can see that there are still even after 15mins of processor stopping,
RxComputationThreadPool * 8 threads running ( looks like this is constant and is not increasing by increasing the clients) -
RxSchedulerPurge * 1 ,
RxCachedWorkerPoolEvictor * 1 these threads are still running.

However
OkHttp ConnectionPool * 5 - Each per client
1 Okio Watchdog, 1 OkHttpConnection Pool are getting cleaned up after approx 5mins.

Total 10 threads are not cleaned up.

Here is the output.

RxSchedulerPurge-1, TIMED_WAITING
RxCachedWorkerPoolEvictor-1, TIMED_WAITING
RxComputationThreadPool-3, WAITING
RxComputationThreadPool-4, WAITING
RxComputationThreadPool-5, WAITING
RxComputationThreadPool-1, WAITING
RxComputationThreadPool-2, WAITING
RxComputationThreadPool-6, WAITING
RxComputationThreadPool-7, WAITING
RxComputationThreadPool-8, WAITING

Could you confirm if this is a bug or am I missing something here?

Thanks.

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

No branches or pull requests

1 participant