mina框架出现too many open files解决办法

当mina nio产生大量socket,而且底层的socket长期处于Time_Wait状态
用netstat -p
可以查看
就会产生too many open files异常。
此时,在程序启动脚本加入
ulimit -SHn 30000
注:红色部分自定义
扩大linux文件打开数量,问题解决。
或者修改socket的等待时常。
apache的官方解决办法:
you may have a too low ulimit setup. It defaults to 1024, and each time you open a socket, that eats a file descriptor.

You have options, though :
> - either you increase this ulimit, or set it to unlimited,
> - or you lower the tcp-time-wait value so that the sockets are closed faster.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值