mina2.0.9 session.close cpu100%

Please implement IoHandler.inputClosed(IoSession) method in your handler and close the session manually. If not, the inputClosed event will not stop being fired.

Mina doesn't close sessions actively since 2.0.9. There will be no issue if custom handlers are derived from IoHandlerAdapter. But if some handler implements the IoHandler interface and forgets to close sessions after inputClosed event, same problem will occur.

See the IoHandlerAdapter:

IoHandlerAdapter.java
public void inputClosed(IoSession session) throws Exception {
    session.close(true);
}


0 down vote accepted

First of all there is no restriction from MINA on number of connections. And This is not a MINA specific problem. This occurs when the peer client resets the connection in middle of conversation. It's just an information that a client has quit brutally. It is very common case with the devices sending data using GPRS. So, it is not really a problem at server side and ts best to clean resources in this scenario, if you have kept any stuff related to the Client there. There is nothing to fix here, except logging less.



转载:https://issues.apache.org/jira/browse/DIRMINA-1001

            http://stackoverflow.com/questions/9526702/apache-mina-java-io-ioexception-connection-reset-by-peer

你可能感兴趣的:(linux,java)