Contents of articles
Error reported by CentOS when executing command: – bash: fork: cannot allocate memory
Error reported by CentOS when executing command: – bash: fork: cannot allocate memory
Background:
executing any command will report – bash: fork: cannot allocate memory, but there is still a lot of free memory.
Problem analysis:
the reason is that the number of processes is full, which exceeds the default value set by the system
View the maximum number of processes
sysctl kernel.pid_max
View the number of processes
ps -eLf | wc -l
You will find that the number of all processes is almost more than the default number of processes
After modifying the maximum number of processes, the system can recover without restarting the process.
echo 1000000 > /proc/sys/kernel/pid_max
Permanent effect
echo "kernel.pid_max=1000000 " >> /etc/sysctl.conf
sysctl -p
Read More:
- Kvm internal error: process exited :cannot set up guest memory ‘pc.ram‘:Cannot allocate memory
- Git bash Error: Could not fork child process: There are no available terminals (-1)
- Git bash here running error: failed to fork child process
- Server composer install error: proc_open(): fork failed-Cannot allocate memory
- Resolve – bash: fork: Retail: resource temporarily unavailable error
- Swap off failed: cannot allocate memory
- os::commit_memory(0x0000000538000000, 11408506880, 0) failed; error=‘Cannot allocate memory‘
- Centos7 viewing and closing firewalls
- RuntimeError: CUDA out of memory. Tried to allocate 600.00 MiB (GPU 0; 23.69 GiB total capacity)
- [Solved] Android compile error: cannot allocate memory
- Error: Could not fork child process: There are no available terminals (-1).
- socket.error : [errno 10048] and view PID process number and port number
- Error:could not fork child process: There are no available terminals (-1).
- Remember a virtual machine expansion swapoff failed: cannot allocate memory
- Mysql cannot allocate memory for the buffer pool solution
- Jstack command execution error: unable to open socket file: target process not responding or hotspot VM not loaded
- The docker installation es reported an error of failed; error = – cannot allocate memory ‘(errno = 12)
- WebHost failed to process a request.Memory gates checking failed because the free memory (140656640 …
- Fatal error: Newspace:: rebalance allocation failed – process out of memory (memory overflow)
- Linux basic command execution error: the solution of command not found