Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 331230

Summary: ExecutorThreadPool needs some (3) minimum core size
Product: [RT] Jetty Reporter: Jan Prach <jendap>
Component: serverAssignee: Greg Wilkins <gregw>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: jetty-inbox
Version: unspecified   
Target Milestone: 7.1.x   
Hardware: PC   
OS: All   
Whiteboard:

Description Jan Prach CLA 2010-11-26 13:40:17 EST
Build Identifier: 7.2.1.v20101111

Hi,

I had ExecutorThreadPool with core thread size of just two.

btw: for special testing, not production ;-)

It works well in 7.1.x, but jetty 7.2.x breaks it. The core size has to be at least 3. Maybe more. I haven't debug so deep. Three works for me. Increasing maximum size does not help.

If it's not a bug then it would be at least nice to find it in ExecutorThreadPool javadoc.


thanks,
Jan

Reproducible: Always

Steps to Reproduce:
1. just add server.setThreadPool(new ExecutorThreadPool(2, 100, 100));
2. try to run it
Comment 1 Greg Wilkins CLA 2010-11-26 17:17:49 EST
the issue is that jetty takes some threads from the pool for long running tasks (eg acceptor threads).

If it runs out of threads, then it has no threads left to handle requests.

We used to have a check in there for threads > acceptors.... I'll investigate why that check/warning is not working.
Comment 2 Greg Wilkins CLA 2010-12-01 08:08:49 EST
I have patched jetty so that a warning is given is there are less threads than acceptors.

r2564