Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: 7.0.0.pre5, 6.1.12
-
Fix Version/s: 7.0.0.pre5, 6.1.12
-
Component/s: None
-
Labels:None
-
Environment:C:\>java -version
java version "1.6.0_10-rc"
Java(TM) SE Runtime Environment (build 1.6.0_10-rc-b28)
Java HotSpot(TM) Client VM (build 11.0-b15, mixed mode, sharing)
-
Number of attachments :
Description
The following code:
AbstractConnector connector = new SelectChannelConnector();
connector.setAcceptors(30);
server.addConnector(connector);
worked with Jetty 6.1.6, but won't work with recent versions of Jetty (long pause followed by an empty page instead of a correctly served page).
Switching to SocketConnector wouldn't help.
What helps, though, is decreasing the number of acceptors to 20 or doing
server.setThreadPool(new QueuedThreadPool(40));
It seems that in the newer version of Jetty the pool is shared, but the connector starts all the threads beforehand and so the pool is depleted.
1. It is regression - old code which worked okey now doesn't works.
2. There is no diagnostics: no log messages or anything, the problem is hard to find.