The following problems occurred when logging on the server today:
Phenomenon
1. Remote CRT login
[root@fast70 ~]# vim /etc/security/limits.d/20-nproc.conf
# Default limit for number of user's processes to prevent
# accidental fork bombs.
# See rhbz #432903 for reasoning.
* soft nproc 65535
root soft nproc unlimited
2. You can log in from other accounts. There is no problem to view the process and load on top
switch to root, and then switch to the fast account
[ root@fast70 ~]# su – fast
last login: May 12 00:32:45 CST 2020 from 192.168.0.9pts/2
Su: warning: cannot change to/home/fast Directory: there is no file or directory
Su: failed to execute/bin/bash: the resource is temporarily unavailable
Solution:
enter the root user
Modify /etc/security/limits.d/20-nproc.conf
expand the maximum value of * user connection (4096 -> 65535)
[root@fast70 ~]# vim /etc/security/limits.d/20-nproc.conf
# Default limit for number of user's processes to prevent
# accidental fork bombs.
# See rhbz #432903 for reasoning.
* soft nproc 65535
root soft nproc unlimited
After modification, remote login and account switching can be used normally
however, I always feel that the root cause has not been found. It must be related to resource occupation, but I can’t find the specific location
I have contacted watchdog to kill the process several times before. I doubt that it is still a symptom rather than a root cause