首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 软件管理 > 软件架构设计 >

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

2012-10-25 
mina框架出现too many open files解决办法当mina nio产生大量socket,而且底层的socket长期处于Time_Wait状

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.

?

?

热点排行