本文介绍了ListeningIOReactor 遇到已检查的异常:打开的文件太多的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们在 WSO2 ESB 4.9.0 中遇到了一个奇怪的问题,错误如下.在我们启动服务器后,服务器正在响应,但它不接受任何 http 请求.下面是错误.我们只是在测试 20-50 个请求...

We are facing a strange issue in WSO2 ESB 4.9.0 with below error. After we start the server, server is respondin but it's not accepting any http requests. Below is the error. We are just testing 20-50 reqeusts...

2016-06-17 13:13:15,330 [-] [PassThrough HTTP-Listener I/O dispatcher Listener]  WARN PassThroughHttpListener System may be unstable: HTTP ListeningIOReactor encountered a checked exception : Too many open files
java.io.IOException: Too many open files
at sun.nio.ch.ServerSocketChannelImpl.accept0(Native Method)
at sun.nio.ch.ServerSocketChannelImpl.accept(ServerSocketChannelImpl.java:241)
at org.apache.http.impl.nio.reactor.DefaultListeningIOReactor.processEvent(DefaultListeningIOReactor.java:170)
at org.apache.http.impl.nio.reactor.DefaultListeningIOReactor.processEvents(DefaultListeningIOReactor.java:153)
at org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor.execute(AbstractMultiworkerIOReactor.java:349)
at org.apache.synapse.transport.passthru.core.PassThroughListeningIOReactorManager$1.run(PassThroughListeningIOReactorManager.java:506)
at java.lang.Thread.run(Thread.java:745

推荐答案

尝试增加文件句柄数&解决上述问题的最大允许打开文件描述符数.

检查当前使用的最大文件句柄数cat/proc/sys/fs/file-nr

Check for the maximum number of file handle and currently in usecat /proc/sys/fs/file-nr

将其更改为 WSO2 推荐的值(可以更改大小写)sysctl -w fs.file-max=65536

Change it to a value recommended by WSO2 (can change case to case)sysctl -w fs.file-max=65536

对于打开的文件描述符ulimit -n

要更改此限制,请编辑/etc/security/limits.conf 文件

* 软 nofile 4096* 硬文件 65535

有关完整列表,请参阅https://docs.wso2.com/display/ESB490/Network+and+OS+Level+Performance+Tuning

For a comprehensive list, please referhttps://docs.wso2.com/display/ESB490/Network+and+OS+Level+Performance+Tuning

这篇关于ListeningIOReactor 遇到已检查的异常:打开的文件太多的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-10 00:28