User information
 Loading ...
Show article in Knowledge Base

 Server error: Too many open files  Export knowledge base Export     SubscribeSubscribe      Show article info

Too many open files

When you are running VisionProject in a Linux environment you may get the "Too many open files" error in your log files. Symptoms that you may get in the user interface is that some functions doesn't work. Sometimes you are kicked out of the system or that some pages doesn't load



The issue manifests itself where the system is configured by default to allow a maximum of only 1024 open file handles which is often not sufficient for the VisionProject application. The error is easily fixed by configuration changes in the operating system

Check if you are affected by the problem

The error is not always logged in visionproject.log. You must also check the tomcat log in


and you may see something like

 SEVERE: Socket accept failed Too many open files
  at Method)at

File Handles

The error "Too many open files" in the may occur on systems during periods of heavy use and therefore it is recommended that on the normal 'open files' handle limit is increased in production systems

How to increase the number for file handles available?

Begin verifying the current open file limit on your system. The global setting for the maximum number of file handles is usually set in /proc/sys/fs/file-max . This should be a large number.


Then, as the user that is running VisionProject execute ulimit -n . 


This will tell you how many file handles the current user can have open at any one time. This should be around 2048 which works well for most customers.


Configuration changes


Assuming you are on Linux and running Tomcat as the user "tomcat7", then, as the root user, edit /etc/security/limits.conf and add:

tomcat7 soft nofile 4096
tomcat7 hard nofile 65536

This will set the normal number of file handles available to user to be 4096 - the soft limit. If this proves to be too few the tomcat7 user can assign themselves more file handles, up to the hard limit, using:

ulimit -n 8192

By adding the following to etc/init.d/tomcat7 this can be done automatically:
ulimit -Hn 8192
ulimit -Sn 8192

User comments
 Loading ...