Issue
When running with a large number of users, we see the error, "Too many open files," in the workgroup server log:
ERROR[WGSExpert][WsExpertThread] - ClientListener.acceptNewConnection() failed.
java.io.IOException: Too many open files
at java.base/sun.nio.ch.ServerSocketChannelImpl.accept0(Native Method)
at java.base/sun.nio.ch.ServerSocketChannelImpl.accept(ServerSocketChannelImpl.java:533)
at java.base/sun.nio.ch.ServerSocketChannelImpl.accept(ServerSocketChannelImpl.java:285)
at com.nastel.wgs.registration.ClientListener.acceptNewConnection(ClientListener.java:92)
at com.nastel.wgs.registration.ClientListener.ProcessSocket(ClientListener.java:80)
at com.nastel.wgs.AsyncListener.dispatch(AsyncListener.java:158)
at com.nastel.wgs.WgsExpert$WgsExpertThread.run(WgsExpert.java:1071)
at java.base/java.lang.Thread.run(Thread.java:834)
Resolution
The number of users and other connections each affect the total number of files that the operating system considers open. If you are running with the default, it is too low to support the number of users or database connections you require.
To eliminate this error, modify ulimit and increase the number of open files to at least 32000. Do this by editing the /etc/security/limits.conf file and adding/modifying the ulimits. For example, add/modify the following lines:
* hard nofile 32768
* soft nofile 32768