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 

then 

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 

OR 

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@192.168.0.2:636 


Another article about tuning Linux can be found here

    Can't find the KB

    Unable to find the KB to address your issue ?  

      • Recent Articles

      • Change Reset Password Button Text

        Change the text of the "Reset Password" button on the UW Login Page How to change the text of the Reset Password button on the Login Page. Login to webNetwork and open webAdmin on your Relay Central Server Expand Customization Center Expand Tenants ...
      • Remove Reset Password Button From Login Page

        Remove the Reset Password Button from the Login Page How to remove the Reset Password button from the Unified Workspace login page. Login to webNetwork and open webAdmin on your Relay Central Server Expand Customization Center Expand Tenants Expand ...
      • Lenovo Unified Workspace End-of-Life Questions and Answers

        As of January 31st 2024, Lenovo Unified Workspace (formerly Stoneware WebNetwork) is no longer supported. This means that we no longer provide licenses, downloads, updates, patches, or technical assistance for this product. If you have any questions ...
      • How do I determine my Unified Workspace license expiration date?

        The best method for determining the licensing information including the expiration date of your Unified Workspace license: Login to your 8090 management console on each server This may take remoting into each LUW server and relay, opening a browser, ...
      • Lenovo Unified Workspace 7.0.2.13 Released

        Highlights of Unified Workspace 7.0.2.13 Before you install: Please view the installation notes here. 7.0.2.13 requires a 7.0 license file. Below is a list of enhancements and fixes released in Unified Workspace 7.0.2.13 Fixed external storage ...
      • 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 ...
      • 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. ...
      • Where do we put custom jar / war files in webNetwork

        These would go into the \stoneware\webserv\web-inf folder. war files would go into the \stoneware\webapps folder and can be mounted using the StonewareDeploy.xml or via a WAR webapp application.
      • CIFS File Nodes slow to ping in webAdmin and not diplaying files or folders in My Files or webStorage

        The customer is seeing that trying to access CIFS file nodes in My Files or webStorage either results in a timeout error or a "There are no files or folders in this folder" message. When testing the file nodes, through webAdmin, it takes up to 5 ...