Setting up of ulimits value with the System Agent, jobs fail with Too many open files (24)
search cancel

Setting up of ulimits value with the System Agent, jobs fail with Too many open files (24)


Article ID: 93236


Updated On:


CA Workload Automation AE - Scheduler (AutoSys) Workload Automation Agent CA Workload Automation DE - System Agent (dSeries) CA Workload Automation DE


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 the above value in the script of the agent.  Edit the cybAgent script in WA Agent install directory.  Add the following parameter above "LD_LIBRARY_PATH=" line

ulimit -n 65536

When agent starts, it will have max number of open files as per above example.  The change will take affect once the agent has been restarted.  The limits can also be checked in Linux by this command:

cat /proc/<pid of Agent>/limits


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         



Additional Information

See also how to integrate it with Linux systemctl command:

On some RedHat servers, usage of LimitNOFILE described in above technical document does not work 

See this post: 

The systemd LimitNOFILE limit is not taken into account 
SOLUTION UNVERIFIED - Updated February 28 2018 at 3:26 PM - English 

A process has different limits although the LimitNOFILE systemd variable has been set for the service.