首页 > 代码库 > 提示内存不足,其它服务不能运行

提示内存不足,其它服务不能运行

环境说明:

提示:fork: Cannot allocate memory
解决方法:

Display Current Process Identifiers Limit On a Linux Based Systems

Type the following command at shell prompt:
$ sysctl kernel.pid_max
OR
$ cat /proc/sys/kernel/pid_max
OR
$ sysctl kernel.pid_max
Sample outputs:

kernel.pid_max = 32768

Allow for more PIDs on a Linux based systems

up to 222 = 4,194,304

Type the following command:
# sysctl -w kernel.pid_max=4194303
OR
# echo 4194303 > /proc/sys/kernel/pid_max

You need to append the following config directive to your /etc/sysctl.conf
kernel.pid_max = 4194303

Please note that this hack is only useful for a large and busy server; don’t try this on an old kernel or on desktop systems.



本文出自 “hhslinux” 博客,谢绝转载!

提示内存不足,其它服务不能运行