You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2023/04/27 13:39:03 UTC

[Bug 66581] New: Idle threads are never destroyed in org.apache.tomcat.websocket.AsyncChannelGroupUtil

https://bz.apache.org/bugzilla/show_bug.cgi?id=66581

            Bug ID: 66581
           Summary: Idle threads are never destroyed in
                    org.apache.tomcat.websocket.AsyncChannelGroupUtil
           Product: Tomcat 11
           Version: unspecified
          Hardware: PC
                OS: Mac OS X 10.1
            Status: NEW
          Severity: normal
          Priority: P2
         Component: WebSocket
          Assignee: dev@tomcat.apache.org
          Reporter: mjgp2@matthewpainter.com
  Target Milestone: -------

Currently the ExecutorService used for this is as such:

ExecutorService executorService = new ThreadPoolExecutor(0, Integer.MAX_VALUE,
Long.MAX_VALUE, TimeUnit.MILLISECONDS, new SynchronousQueue<>(), new
AsyncIOThreadFactory());

This means that the threads never terminate and are spawned whenever a thread
is not available, which for a server under a spike of load spawns many threads
which never exit, consuming system resources indefinitely.

I would suggest that a saner idle timeout than Long.MAX_VALUE should be used,
such as 60 seconds, unless there is a good reason I am unaware of as to why
such threads should never die.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 66581] Idle threads are never destroyed in org.apache.tomcat.websocket.AsyncChannelGroupUtil

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=66581

Matt <mj...@matthewpainter.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                URL|                            |https://github.com/apache/t
                   |                            |omcat/pull/612/files

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 66581] Idle threads are never destroyed in org.apache.tomcat.websocket.AsyncChannelGroupUtil

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=66581

--- Comment #1 from Matt <mj...@matthewpainter.com> ---
See: https://github.com/apache/tomcat/pull/612/files

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 66581] Idle threads are never destroyed in org.apache.tomcat.websocket.AsyncChannelGroupUtil

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=66581

Mark Thomas <ma...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #2 from Mark Thomas <ma...@apache.org> ---
Fixed in:
- 11.0.x for 11.0.0-M6 onwards
- 10.1.x for 10.1.9 onwards
-  9.0.x for  9.0.75 onwards
-  8.5.x for  8.5.89 onwards

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org