users@jersey.java.net

[Jersey] It's very hard to increase the number of worker threads in Jersey-Grizzly module.

From: <matrix3456_at_gmail.com>
Date: Tue, 29 May 2012 18:14:34 +0000 (GMT)

I use jersey 1.12 right now and i experienced a server non-response
case recently after the server was started for a while. Then i dig into
this, and find out that some of my API take too long to connect to
another service server due to the broken network.

And the same time, the server runs very slow, seems like cannot accept
any new connection. Actually all the worker threads are busying
waiting. The default number of the worker thread is
Runtime.getRuntime().availableProcessors() * 2 = 4 on my box. So i want
to increase this number.

The only way to accomplish this i found so far is to override
createHttpServer method in GrizzlyServerFactory, the override the
default value before starting the server. But GrizzlyServerFactory has
a final class modifier, so i copy all the code into a new class in
order to do this.

Is there any config options beside this?