问题
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
回答1:
This will happen when you burst the ESB with lot of requests, and the ESB does not close the connections properly. Then all the file descriptors associated with those stale connections remains as it is and gets exhausted. If you have disabled the keep-alive then there's a high tendency for this issue to occur.
回答2:
Try to increase the number of file handles & maximum allowable number of open file descriptors to fix the above issue.
Check for the maximum number of file handle and currently in use cat /proc/sys/fs/file-nr
Change it to a value recommended by WSO2 (can change case to case) sysctl -w fs.file-max=65536
For open file descriptors ulimit -n
To change this limit, edit the /etc/security/limits.conf file
* soft nofile 4096 * hard nofile 65535
For a comprehensive list, please refer https://docs.wso2.com/display/ESB490/Network+and+OS+Level+Performance+Tuning
来源:https://stackoverflow.com/questions/37887904/listeningioreactor-encountered-a-checked-exception-too-many-open-files