mina2.0.9 session.close cpu100%

80 篇文章 1 订阅

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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值