mina-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brian Parkinson" <pa...@ecobee.com>
Subject Problem with mina hanging?
Date Fri, 22 May 2009 18:44:25 GMT
Hello:

Hoping someone out there can help me, or at least point me in the right
direction.

I have a server built on top of mina - this communicates over HTTP and
HTTPS with a number of home thermostats (wifi enabled). It's all working
well, but I have a problem where the server locks up after about a week
of operation.

The server opens HTTP on port 8088, and HTTPs on port 8089. When the
server locks up, it appears that no messages are accepted on either port
(?) which seems weird. I'm still trying to nail this down further, but
that's about all I know right now.

I am running a somewhat older (pre-release) version of mina - it's
mina-core-2.0.0M1.jar. I recall that I built this from maven, but this
is a long while ago - like a year.

So, a bit of a vague question - does anyone recall that there may be a
deadlock in the mina code?

Any help is appreciated - it's so far been tough to debug, as it takes
about a week to manifest itself, and then when it does, it's a bit late
to get some stats and/or thread dumps. I don't think I'm running out of
file descriptors (I increased this value) but this seems to be resource
exhaustion of some kind. It's not an Out of Memory error I'm pretty
sure. There are no errors or exceptions in the logs; the server just
stops dead.

Any ideas, hints, advice really appreciated - I'm so far stumped.

I can certainly upgrade to the latest version of mina.

parki...


// Create an acceptor
NioSocketAcceptor acceptor = new NioSocketAcceptor();
		
DefaultIoFilterChainBuilder chain = acceptor.getFilterChain();

// Create a service configuration
chain.addLast("protocolFilter", new ProtocolCodecFilter(new
HttpServerProtocolCodecFactory()));
			
if(sslEnabled)
{
    Log.info(Server.class, "start", "Adding SSL filter.");

    SslFilter sslFilter = new
SslFilter(SslContextFactory.getServerContext());		
    chain.addFirst("sslFilter", sslFilter);
}
		    
// Add in the custom filter which manages session information within the
server.
// Add to the front of the chain, as we trap everything we need to here.
chain.addFirst("myFilter", new ServerFilter(sslEnabled));
    
// Set up the local address.
acceptor.setLocalAddress(new InetSocketAddress(port));
		
// Create the server handler and bind id to the acceptor.
RequestHandler handler = new RequestHandler(sslEnabled);
acceptor.setHandler(handler);
acceptor.bind();

--- x8 snip

Brian Parkinson  parki@ecobee.com
Senior Software Architect
T 416.987.1049   C 416.725.2548  F 866.592.7344
ecobee | green made easy
www.ecobee.com


333 Adelaide St. West | 6th Floor | Toronto | Ontario | M5V 1R5

This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they are
addressed. If you have received this email in error please notify the
Sender and delete all copies of this email. Please note that any views
or opinions presented in this email are solely those of the author and
do not necessarily represent those of ecobee. The recipient should check
this email and any attachments for the presence of viruses. ecobee
accepts no liability for any damage caused by any virus transmitted by
this email.

 


Mime
View raw message