When making changes to /etc/init.d/limits.conf, the WA Agent does not pick up the correct limits.
CA WA System Agent 11.x, 12.x
OS: Linux\UNIX
When WA Agent starts as root (or any other user), the ulimits of the root user will be passed on to the user of the job.
If the job results in "Too many open files (24)" error then user (root) is reaching the limit. There are several ways to increase the file open limits (fs.file-max).
1. Change the user limit in /etc/security/limits.conf
Add or change the following values:
root hard nofile 65536 root soft nofile 65536
Note: The above example shows root user will set number of open file limit to 65536. Change the value as per requirements. Change in /etc/security/limits.conf file may require a reboot of OS.
2. The other option is to add following in the service file of WA_AGENT (change value to suit the needs). The service file may be found in /etc/systemd/system/<name of agent servcie>.service
LimitNOFILE=10240
Restart the agent from systemctl command as root. The limits can also be checked in Linux by this command:
cat /proc/<pid of Agent>/limits
Example:
cat /proc/7929/limits
Limit Soft Limit Hard Limit Units
Max cpu time unlimited unlimited seconds
....
Max resident set unlimited unlimited bytes
Max processes 6814 6814 processes
Max open files 65536 65536 files
Max locked memory 65536 65536 bytes
....
See also how to integrate it with Linux systemctl command via this article.
On some RedHat servers, usage of LimitNOFILE described in above technical document does not work
See this post from Redhat
The systemd LimitNOFILE limit is not taken into account
SOLUTION UNVERIFIED - Updated February 28 2018 at 3:26 PM - English
Issue
A process has different limits although the LimitNOFILE systemd variable has been set for the service.