#2252
Linux | /etc/security/limits.conf
Limiting user processes is important for running a stable system. To limit user process resource, you have just to set shell limit by adding:
- a user name
- or group name
- or all users
to /etc/security/limits.conf file and impose then process limitations.
Example of /etc/security/limits.conf file
* hard nofile 65535 * soft nofile 4096 @student hard nproc 16384 @student soft nproc 2047
A soft limit is like a warning and hard limit is a real max limit. For example, following will prevent anyone in the student group from having more than 50 processes, and a warning will be given at 30 processes.
@student hard nproc 50 @student soft nproc 30
Hard limits are maintained by the kernel while the soft limits are enforced by the shell.
[Cron] How-to Nginx Proxy Manager – Gérez vos hôtes Nginx avec cette interface graphique – Korben
Check the number of opened files for a process :
to apply the changes in /etc/security/limits.conf without restart :