1. Problem background
Start a process, and the process reports an error: cannot allocate memory
2. Cause of problem
Check the script of this process. It is found that the script needs to call the memory of the system kernel to start, but the current kernel memory is not allocated.
3. Troubleshooting
1. View the remaining memory of the current physical machine
free -m
2. View the number of processes in the current system
# The maximum number of processes allowed in the system
sysctl kernel.pid_max
# The maximum number of processes on the current host
ps -eLf | wc -l
3. View memory application and availability
cat /proc/meminfo | grep Commit
4. Solution
Unable to allocate kernel memory
sysctl overcommit_memory=1
Read More:
- Popen error: cannot allocate memory [How to Solve]
- [Solved] NIC cannot be generated vf, intel/mellanox, write error: Cannot allocate memory “not enough MMIO resources for SR-IOV”
- [Linux] ps+awk +while View process memory usage in real time
- How to Delete New Memory in Vector
- The Linux setroubleshootd process occupies too much memory [How to Solve]
- Ffmpeg about Avio_alloc_Context application for memory release
- [Solved] fatal error: cannot write PCH file: required memory segment unavailable
- Linux system service command error: Failed to allocate directory watch: Too many open files
- Es Container Error: too many open files [How to Solve]
- The semget function error: errno is set to 28 [How to Solve]
- Error: could not fork new process for connection: Resource temporarily unavailable
- linux tomcat Run (DWP exit error AGENT_ERROR_TRANSPORT_INIT(197): No transports initialized [debugIni)
- [Solved] Linux Error: Error: ENOSPC: System limit for number of file watchers
- [Solved] Linux Error: ENOSPC: System limit for number of file watchers
- [Solved] Error: ENOSPC: System limit for number of file watchers reached
- Docker Run ‘echo core > /proc/sys/kernel/core_pattern‘ Error
- [Solved] xtrabackup Error: “Too many open files” (system error number 24)
- Failed to Connect NVIDIA Driver: NVIDIA-SMI has failed because it couldn‘t communicate with the NVIDIA driver
- [Solved] Rocketmq error: service not available now, may disk full, CL: 0.95, CQ: 0.95, index: 0.95
- [Solved] RHEL 7 installs Oracle RAC 11.2.0.4, executes root.sh error ohasd: failed to start