bash: fork: Cannot allocate memory problem handling

Today, the server cannot SSH, and the VNC operation command prompts fork: cannot allocate memory

free to check the memory (note that the command may take a few more times to come out)

 

View the maximum number of processes sysctl kernel.pid_max

 

ps -eLf | wc -l to view the number of processes

 

Confirm that the number of processes is full

After modifying the maximum number of processes, the system restores
echo 1000000 > /proc/sys/kernel/pid_max

Permanent
echo "kernel.pid_max=1000000 " >> /etc/sysctl.conf
sysctl -p

 

Guess you like

Origin blog.csdn.net/leonnew/article/details/124248710