Provide a way to shutdown ConnectionPool.executor and stop WatchDog threads [Not Solved]
See original GitHub issueWhat kind of issue is this?
- Feature Request.
I am using OkHttpClient in a maven java:exec context and get the following error:
[WARNING] thread Thread[OkHttp ConnectionPool,5,ch.loewenfels.depgraph.runner.Main] was interrupted but is still alive after waiting at least 15000msecs
[WARNING] thread Thread[OkHttp ConnectionPool,5,ch.loewenfels.depgraph.runner.Main] will linger despite being asked to die via interruption
[WARNING] thread Thread[Okio Watchdog,5,ch.loewenfels.depgraph.runner.Main] will linger despite being asked to die via interruption
[WARNING] NOTE: 2 thread(s) did not finish despite being asked to via interruption. This is not a problem with exec:java, it is a problem with the running code. Although not serious, it should be remedied.
[WARNING] Couldn't destroy threadgroup org.codehaus.mojo.exec.ExecJavaMojo$IsolatedThreadGroup[name=ch.loewenfels.depgraph.runner.Main,maxpri=10]
I am aware of that I can set cleanupDaemonThreads
to false in the maven java:exec configuration but that seems wrong to me. It would be nicer if I can shutdown everything myself rather than relying on that the threads stop at some point. In the light of the many bugs concerning similar problematics (memory leak, thread does not stop etc.) I would appreciate if I can stop everything myself.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:2
- Comments:14 (2 by maintainers)
Top Results From Across the Web
The web application appears to have started a thread ...
Resource Link: Solution to “Tomcat can't stop [Abandoned connection ... Your shutdown method for the Executor is likely being called.
Read more >Solved: Re: InvokeHTTP randomly hangs
I have a NiFi flow [on a 2 processor machine using 8/5 thread counts] where the InvokeHTTP block is no longer processing files...
Read more >db connection loss & huge number of blocked thread...
i profiled the application but i can not see anything unusual and the db backup did not increase in an unusual way. Do...
Read more >Memory leak messages when shutting down Apache ...
Solution. These messages can be safely ignored providing Tomcat is not prevented from shutting down. As they occur during shutdown, any memory ...
Read more >ExecutorService (Java Platform SE 8 )
Two different methods are provided for shutting down an ExecutorService . The shutdown() method will allow previously submitted tasks to execute before ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
nah… that does not work 👎 Please repoen the issue. This only shuts the executorService of the dispatcher down but not the executorService of the connection poll and neither does it stop the watchdog threads
@tendulkar nope, see https://github.com/square/okhttp/issues/3957#issuecomment-379313822 above