We are seeing fairly consistent connection timeouts when our clients are
connecting to our Mina application.
OS: Ubuntu 9.04
Mina Version: 2.0 M5 and M6
JVM: IBM 1.5, 1.6 and Sun 1.5, 1.6
We have tried a variety of configurations for the NioSocketAcceptor, our
latest attempt is as follows:
NioSocketAcceptor acceptor = new NioSocketAcceptor();
acceptor.setReuseAddress(true);
executor = new OrderedThreadPoolExecutor(16);
acceptor.getFilterChain().addFirst("executor",
new ExecutorFilter(executor));
GenericHandler handler = new GenericHandler();
handler.addHandler(9022, new SshHander());
handler.addHandler(9050, new LogHandler());
acceptor.setHandler(handler);
Set<Integer> ports = handler.getPorts();
List<InetSocketAddress> addresses = new
LinkedList<InetSocketAddress>();
for (int port : ports) {
addresses.add(new InetSocketAddress(port));
}
The client application makes multiple connections and executes one or two
commands before disconnect. The client is multi-threaded and will generate
a significant amount of session traffic in concentrated bursts.
We are seeing very consistent slow performance in accepting the client
connection as well as connection timeouts. We have tried both with and
without an ExecutorFilter, as well as using both CachedThreadPool and
OrderedThreadPool for the Executor and also increasing the number of
NioProcessors and assigning the Executor and IoProcessor thread pools in the
constructor for NioSocketAcceptor. The results in every case are basically
the same, as the number of concurrent connection attempts increase the
amount of time it takes to establish a connection and execute a transaction
increases until the client starts to experience intermittent connection
timeouts.
The client app is connecting via ssh protocol and we are using the apache
mina sshd on the server side. When I replace the mina application with a
standard OpenSSH sshd we do not see any problems with performance or
connection timeouts.
I found a message thread that appears to be close to what we are seeing from
a symptom perspective at
http://osdir.com/ml/apache.mina.user/2008-03/msg00054.html but from the
thread it is not clear what the resolution was, if any.
We could really use some help on this, time is a pressing issue for
prodcuing this solution and if we cannot resolve the performance issue
quickly we will have to move away from the Mina platform. I am not at
liberty to say what company this is for at this point, but suffice to say if
we can make this happen it will definitely be a feather in the Mina
community's hat.
Thanks for any insight you can provide.