-
Notifications
You must be signed in to change notification settings - Fork 9.1k
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
Tomcat is not able to stop because of "OkHttp ConnectionPool" and "Okio Watchdog" threads #5542
Comments
If you have long polling calls that are still active, you need to cancel those yourself. |
Long polling is not the problem. The problem is okhttp creates threads and do not allow to cleanup. I agree that those threads will stop after defined timeouts but there is need to stop them NOW. My suggestion is to enrich an API that allows publicly shutdown/stop "Okio Watchdog" thread and In
No way to stop it. In
No way to shutdownNow |
This is how it works.
and And there is no API to shutdownNow those ThreadPoolExecutors/Threads As expected all threads dies after 6 minutes Demo app
System out
|
Can we help you to solve this problem? |
We're making threading changes for the next release. |
Follow the bug above for tracking. |
There is no possibility to stop/terminate
OkHttp ConnectionPool
andOkio Watchdog
threads.When there is long poling connections e.g. 10 minutes there is no way to terminate it and stop threads.
Method
evictAll
doesn't work in this situation.Threads will be stopped after 10 minutes but it is to late and Tomcat will never stop.
Many API'a like Consul use long polling
apache-tomcat-9.0.26
Classes RealConnectionPool and ConnectionPool are final and there is no possibility to do anything with sockets
The text was updated successfully, but these errors were encountered: