Resolve – bash: fork: Retail: resource temporarily unavailable error

1. If -bash: fork: retry: Resource error is unavailable, then you have no further questions. If the maximum number of Linux processes is exceeded, then change the maximum number of Linux processes.

Connect to the server using the CRT connection tool

[support@localhost ~]$ ulimit -a
core file size          (blocks, -c) 0
data seg size           (kbytes, -d) unlimited
scheduling priority             (-e) 0
file size               (blocks, -f) unlimited
pending signals                 (-i) 127405
max locked memory       (kbytes, -l) 64
max memory size         (kbytes, -m) unlimited
open files                      (-n) 1024
pipe size            (512 bytes, -p) 8
POSIX message queues     (bytes, -q) 819200
real-time priority              (-r) 0
stack size              (kbytes, -s) 10240
cpu time               (seconds, -t) unlimited
max user processes              (-u) 1024
virtual memory          (kbytes, -v) unlimited
file locks                      (-x) unlimited
[support@localhost ~]$ 

You can’t switch root after logging in, even if you type the clear command, you will get an error.
online said it could open too many processes, the system allows you to create the maximum number of processes Max user the processes the parameters.
> Max user processes can use ulimit-u 4096, but only in the session of the current terminal. The default values will be used once you log in again. So it can’t be used.
the right way to change is to modify the/etc/security/limits. D/90 – nproc. The values in the conf file. CD/etc/securit/lims.d/
: : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : :

# Default limit for number of user's processes to prevent
# accidental fork bombs.
# See rhbz #432903 for reasoning.

*          soft    nproc     4096
root       soft    nproc     unlimited

You can change the value, but note that root is used for the change, and no other user has permission by default.
because they have no root, he found a can be resource-intensive process, users can connect.
On the Internet to see the number of connections command
ps – the eLf | grep username, check the progress of the target user.
Reference links: http://www.nginx.cn/3002.html
https://zhidao.baidu.com/question/1640745287732090500.html

Read More: