Ulimit values control certain characteristics about what resources processes have access to. These values can be set globally or per user.
The modification of operating system configurations such as the ulimit configuration is a task that is best handled by an obtained systems administrator that has the skills, training, and expertise required to do so for you. This isn't a change that cPanel support will perform.
The following information is provided as a courtesy, and the procedure is not something that cPanel support is able to assist with.
Please note, cPanel's Shell Fork Bomb Protection feature will override these settings and force the account to a limit of 35 processes. This feature can be enabled and disabled in WHM at:
"Home / Security Center / Shell Fork Bomb Protection"
If Shell Fork Bomb Protection is enabled and you want to customize the limits set then please use the following article instead: How to create custom Fork Bomb Protection settings
These values are configured in the following file:
Any entries added to this file require 4 columns.
- Domain: This can be a user a group or a wildcard that specifies all users.
- Type: This can be "soft" or "hard" for the type of limit you are configuring
- Item: The valid limits can be any of the following:
core- limits the core file size (KB)
data- max data size (KB)
fsize- maximum filesize (KB)
memlock- max locked-in-memory address space (KB)
nofile- max number of open files
rss- max resident set size (KB)
stack- max stack size (KB)
cpu- max CPU time (MIN)
nproc- max number of processes (see note below)
as- address space limit (KB)
maxlogins- max number of logins for this user
maxsyslogins- max number of logins on the system
priority- the priority to run user process with
locks- max number of file locks the user can hold
sigpending- max number of pending signals
msgqueue- max memory used by POSIX message queues (bytes)
nice- max nice priority allowed to raise to values: [-20, 19]
rtprio- max realtime priority
- Value: The value of the setting you are modifying
The following limits.conf line sets the user number of processes to 25.
$USER hard nproc 25
The command above modified the number of processes for a user to be restricted to only 25 processes and can be seen with the ulimit command after obtaining a new shell via terminal or ssh.
[domain@cloudlinux ~]$ ulimit -u