Smarts | Running out of open file descriptors how to increase file descriptors
search cancel

Smarts | Running out of open file descriptors how to increase file descriptors

book

Article ID: 331624

calendar_today

Updated On:

Products

VMware Smart Assurance

Issue/Introduction

Symptoms:


If you are getting error  Too many open files" or "cannot open library xxx", smarts has reached the open file limit allowed by linux. You need to increase open file limit as below:

Environment

VMware Smart Assurance - SMARTS

Cause

Smarts has reached the open file limit allowed by Linux.

Resolution

su to the user you want to check
su - root
 
#Check max limit in Linux
cat /proc/sys/fs/file-max
 
#Check number of global open file descriptors in use
sysctl fs.nr_open
 
#Check Hard Limit in Linux
ulimit -Hn
 
#Check Soft Limits in Linux
ulimit -Sn
 
#Check current number of open files being used by root
lsof -u root | awk 'BEGIN { total = 0; } $4 ~ /^[0-9]/ { total += 1 } END { print total }'
 
#To increase roots limits
add/modifty the below to the limits.conf file
vi /etc/security/limits.conf
 
root soft nofile 2048
root hard nofile 4096
 
#To increase the system-wide limits
vi /etc/sysctl.conf
Add following:
fs.file-max = 3213254
 
#To make the changes take effect
Run:
sysctl -p
 
Open a new shell and verify that the changes have taken effect
the new values should be present by running
 
ulimit -Hn
ulimit -Sn
 
As the limits of root was changed, you will need to restart the application from a new shell window, or restart the system for the changes to take effect.