Too many open files

Too many open files

There are a few things to check and these should be done on the server that is having the issue. If your webNetwork Server (loader) is having the issue then your webNetwork Relay won't start up because it would not be able to obtain a connection with the webNetwork Server. 

A little background on this, this issue is dependent on the version / patch level / flavor of linux you have installed. Some customers never have to change this, others may have to tune their linux after rolling it out to many more users. Tuning in this case involves increasing the number of open files that the system will allow. 

The following URL helps explain this issue further and is from another 3rd party webserver running on linux. 

The first thing you want to do is do a ulimit –a (full information) or ulimit –n (just number of open files allowed) to see what value your system is using. 

Next you would want to do some investigation on what type of open files you have on your system. Keep in mind that every TCP connection, every file open and running on the system is considered an "open file" so if you are experiencing a denial of service attack you may have thousands of tcp connections opened, which in turn count as an open file. 

To find how many open files are related to webNetwork, you can do the following: 

Find the process id that java is running as. ps -ef | grep stoneware 

This will show something like : root 6546 1 3 Mar26 ? 00:42:57 /usr/stoneware/bin/../jre/bin/java 
The process id is 6546 

Next perform the following command : 

lsof -p 6546 > /tmp/listoffiles.txt 


lsof -p 6546 | wc -l 

and note the number. This is the number of open files that java has opened. 
The file /tmp/listoffiles.txt will show what files are currently open. 

Or you can do a lsof | grep java | wc -l 

Next you may need to increase the number of open files your system allows. There are few ways to increase the number of open files. 

To increase the limit, edit /etc/security/limits.conf and add 

* soft nofile 4096 
* hard nofile 65535 


To increase the limit edit your /etc/init.d/boot.local and add the following to the bottom. 
ulimit -n 4096 
Replace 4096 with an appropriate number for your site. 

Reboot box when done. Once back up, check again with the ulimit -a 

If the issue is not enough file handles, use the following commands to increase: 
sysctl –a 

The fs.file-max should be above 200000. If it is not, edit /etc/sysctl.conf and add that line. 

type sysctl -p to apply changes. 

The numbers here are examples, yours may vary based on the version / patch level / flavor of linux and the number of users accessing your system at the same time. 

Some other uses of "lsof" 

Show TCP connections : lsof -i TCP 
Show TCP connections on port 80 : lsof -i TCP:80 
Show files opened by a program : lsof -c mysq 
Show connections on specific ip port : lsof -i TCP@ 

Another article about tuning Linux can be found here

    • Related Articles

    • How many RDP sessions without Terminal Server/RDS license?

      How many users can I RDP into a windows server without having to purchase RDS/Terminal Server licenses? Microsoft limits it to 2. If you need to allow 2 connections from the same user you will need to change the configuration.  You can configure the ...
    • Unable to Download or View Files with LUW Android application

      Problem:  I cannot Download or View files from Lenovo Unified Workspace Android application when trying to open files via the webStorage or myFiles links. Cause:  Lenovo Unified Workspace Application permissions on Android device Solution(s): Enable ...
    • How many connections for webRDP HTML5 Client?

      With RDP and the webRDP Gateway, the resource usage depends on what type of work the user is doing on the terminal server/back end RDP machine.  In a worst case scenario: The Gateway has an Intel I5-3570 @ 3.4GHz, 2 Gig of RAM is dedicated in the ...
    • Where can we put custom html files

      Question We have some HTML files that we want to see for components and links in the portal, where should we put them? Solution There are 3 options available: Make a folder in the stoneware/webserv directory. For example : companyfiles Then put your ...
    • How to open an app on iOS device

      Problem:  From an iOS device, you would like to open an app installed on a users device. Cause:  The app must be called from the browser using a URL scheme, which is configured by the developer when submitting the application to Apple. ...
    • Popular Articles

    • Old Browser Versions

      Question: I am using an older browser version and am having problems. What can be done ? We are not able to upgrade the browser at this time.   This is a challenge for any company that makes software that utilizes a browser. Since Stoneware does not ...
    • LCS Redirection

      Problem: How to redirect the LCS in an environment with multiple LCSs and students connecting to them. Solution(s): Create an allow.cfg on all LCS(s) (including the Master) in the network, however, even if no allow.cfg is present on an LCS, machines ...
    • Time windows allows for Service Shutdown

      Issue: Can the time windows gives a service to shut down before it kills the service be increased? Solution: Yes, the following information comes from the Microsoft URL : To specify the wait time, do the ...
    • How to disable password saving - Internet Explorer

      Having multiple methods for saving a password in the browser can cause confusion for the user.   To disable password saving in Internet Explorer, launch Internet Explorer and perform the following steps. Click the blue Settings menu icon in the upper ...
    • How to disable password saving - Chrome

      Having multiple methods for saving a password in the browser can cause confusion for the user.  To disable password saving in Chrome, launch Chrome and perform the following steps. Click the Chrome menu button in the upper right corner of the Chrome ...
    • Recent Articles

    • Lenovo Unified Workspace Released

      Highlights of Unified Workspace If you need assistance with your update, please e-mail support at or visit for more information. Below is a list of enhancements and fixes for ...
    • How to fix customized login and profile after upgrading to v7.0

      With the release of 7.0 the default login page has been modified to simplify the customization process.  If you are having an issue with the login page not displaying, after upgrading to v7.0, you will need to delete the custom CSS code and start ...
    • SAML SP - Sync Directory Password

      Login script to prompt for directory password Since the user does not login into Unified Workspace with a password, we cannot capture the password to use in the @@password@@ variable.  If you would like to use the Active Directory password for other ...
    • MySQL 8 SSL

      Issue Admin is making a database connection to a MySQL 8 database.  When clicking the Ping button on the DB Connection object, the following error is presented: WARN: Establishing SSL connection without server's identity verification is not ...
    • 7.0 excludeProtocols - includeProtocols - allowCiphers - denyCiphers config file

      excludeProtocols - includeProtocols - allowCiphers - denyCiphers config file The following configuration is recommended for systems running, and higher. (For older 6.5 releases of UW, please see this article.) ...