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 BIO] Thread Count Explosion #1028
Comments
It's expected since you are using Blocking I/O and Tomcat. One thread will be used for every connection. You need to use NIO or APR if you don't want that behavior |
But it clearly states on startup that it is using Tomcat7AsyncSupportWithWebSocket, unless I am missing something? 08:26:25.223 [localhost-startStop-1] WARN o.atmosphere.cpr.AtmosphereFramework
|
Is this something I have misconfigured in Atmosphere, or at the Tomcat level? |
Your configuration of Tomcat is wrong. Take a look at their documentation about configuring connector. |
Ok, so by switching to org.apache.coyote.http11.Http11NioProtocol I shouldn't see this threads kicking around when I have IDLE_DESTROY as the BroadcasterLifecyclePolicy? Or at least see them for a while but they should actually be terminated at the 300s mark after idle? |
If you still see
that means your configuration is still wrong. For threads, setup yourself the Executors and set them to clear their threads faster. Please jump on the ML for more discussion as this is not a bug. Thanks |
Similar to #716, #717, #766, I am seeing the same behaviours. Version of Atmosphere is 1.0.12, configuration is set to IDLE_DESTROY, timeout the default of 300000ms (5mins).
Server creeps up to about 300 threads in WAITING state, and then refuses any more connections.
Each thread from the dump appears as follows:
Broadcaster lookup is done via:
and when debugging does return the same Broadcaster, so it doesn't appear that the Broadcasters are multiplying, just the servlets not cleaning up and going away properly.
The text was updated successfully, but these errors were encountered: