eperi sEcure Platform crashes because of too many open files

Condition

The eperi sEcure Platform crashes because of too many open files. In this case something like the following appears in the log:
<date> <time> org.apache.tomcat.util.net.Acceptor run
SEVERE: Socket accept 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(Unknown Source)
at java.base/sun.nio.ch.ServerSocketChannelImpl.accept(Unknown Source)
at org.apache.tomcat.util.net.NioEndpoint.serverSocketAccept(NioEndpoint.java:468)
at org.apache.tomcat.util.net.NioEndpoint.serverSocketAccept(NioEndpoint.java:71)
.... 

Cause

The open files limit has been exceeded. The maximum number of files that the eperi sEcure Platform can open simultaneously needs to be increased.

Remedy

Procedure

  1. Limit the number of open files for the eperi user as follows:
    1. Connect to the target server using your preferred ssh tool (e.g. putty) and log in.
    2. Edit the file /etc/security/limits.conf.
    3. Add the following lines to the end of the file:
      eperi hard nofile 65535
      eperi soft nofile 65535
      eperi hard nproc 65535
      eperi soft nproc 65535
    4. Save and exit the file.
    5. Edit the files /etc/systemd/user.conf and /etc/systemd/system.conf.
    6. Increase the systemwide open files limit by adding the following line to the end of both files:
      DefaultLimitNOFILE=65535
    7. Save and exit the file.
  2. Restart the eperi sEcure Platform.
  3. You can check the open file limit for the tomcat process by executing the following command:
    cat /proc/<tomcatPID>/limits
  4. In a cluster setup repeat the steps above on each eperi sEcure Platform cluster node.