Troubleshooting

Resolving "Too many open files" DVServer exception on Linux


Userlevel 5
Badge
  • Community Manager
  • 21 replies

Sometimes DVServer starts to report the following exceptions in logs:

 

04:46:04,054 WARNING [io.netty.channel.DefaultChannelPipeline] (NIO0) An exceptionCaught() event was fired, and it reached at the tail of the pipeline. It usually means the last handler in the pipeline did not handle the exception.: java.io.IOException: Too many open files

 

The server may go unresponsive or even stop due to those errors.

This happens because the set limit of open files is too restrictive (1024 by default), either system-wide or, most probably, for a particular user that runs DVServer. To extend the user's limit edit the system "limits.conf" configuration file adding the following lines:

<username> soft nofile 65536<username> hard nofile 65536

The <username> placeholder should be replaced with actual system user name or with asterisk "*" to increase the limit for all users. 
The "limits.conf" configuration file resides in /etc/security directory on most modern Linux distributions, but this may very, consult with particular Linux distribution documentation.

To extend the system-wide limit edit the /etc/sysctl.conf file adding or changing the following setting:

fs.file-max = 262144

To apply the new setting run the following command:

sysctl -p

and it may also require the DVServer restart.


0 replies

Be the first to reply!

Reply