From: Robert S. <rob...@ro...> - 2009-12-17 19:02:03
|
I've just spent the last few days tracking down a problem with one of our installations. The site is a very high load system with lots (>600) of very active connections. At times of high load a large number of the users were getting page refusals (connection resets). After lots of head scratching I finally found the culprit ! We were setting the socket listeners maxThreads value to 1000, but after running a load test in the office I found that I could only make 256 connections to the server. After this all further connection attempts were refused. I looked through the Jetty code and found the POOL_MAX variable in Pool.java, which defaults to 256. Setting this to a higher value (500) cured the problem. Looking further through the code, it appears that when you set maxThreads to a higher value this doesn't affect the _pondLife array which has already been initialised to the lower 256 limit. Now that I know about the problem I can work around it (initialse POOL_MAX to the same value as we use for maxThreads) but in the absence of a fix for Jetty 5 it might be helpful to add this to a FAQ somewhere. I've had a quick look at the Jetty 6 code base (that we use for the latest version of our software) and can't see anything similar in there. Regards, Rob Stone |