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

chore: makes HttpClient instance available for garbage collection #20746

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mcollovati
Copy link
Collaborator

Allows the HttpClient default executor to be properly shutdown when HttpClient is not referenced anymore.

Allows the HttpClient default executor to be properly shutdown when HttpClient
is not referenced anymore.
@mcollovati
Copy link
Collaborator Author

With this change, the following logs on shutdown/restart disappear

WARNING [Thread-20] --- org.apache.catalina.loader.WebappClassLoaderBase: The web application [ROOT] appears to have started a thread named [HttpClient-6-Worker-0] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
 [email protected]/jdk.internal.misc.Unsafe.park(Native Method)
 [email protected]/java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:252)
 [email protected]/java.util.concurrent.SynchronousQueue$TransferStack.transfer(SynchronousQueue.java:401)
 [email protected]/java.util.concurrent.SynchronousQueue.poll(SynchronousQueue.java:903)
 [email protected]/java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1061)
 [email protected]/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1122)
 [email protected]/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
 [email protected]/java.lang.Thread.run(Thread.java:840)

Copy link

sonarcloud bot commented Dec 18, 2024

Copy link

github-actions bot commented Dec 18, 2024

Test Results

1 159 files  ±0  1 159 suites  ±0   1h 35m 48s ⏱️ + 6m 37s
7 568 tests ±0  7 512 ✅ ±0  56 💤 ±0  0 ❌ ±0 
7 912 runs   - 2  7 848 ✅  - 1  64 💤  - 1  0 ❌ ±0 

Results for commit 1976bca. ± Comparison against base commit fb02577.

♻️ This comment has been updated with latest results.

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.

2 participants