Introduction
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
Procedure
These values are configured in the following file:
/etc/security/limits.conf
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 filesrss
- 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 usermaxsyslogins
- max number of logins on the systempriority
- the priority to run user process withlocks
- max number of file locks the user can holdsigpending
- max number of pending signalsmsgqueue
- 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
Example:
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
25
Comments
0 comments
Article is closed for comments.