My Oracle Support Banner

Oracle Linux: "error: fork: Cannot allocate memory" (Doc ID 2675638.1)

Last updated on JUNE 05, 2020

Applies to:

Linux OS - Version Oracle Linux 6.5 and later
Linux x86-64

Symptoms

User is seeing these messages when executing simple commands like ls, df, id, etc.

-bash-4.1# id
-bash: fork: Cannot allocate memory
 
/var/log/messages:
 
May 3 00:05:03 <hostname> sshd[28839]: error: do_exec_pty: fork: Cannot allocate memory
May 3 08:16:24 <hostname> abrtd: fork: Cannot allocate memory
May 3 16:24:02 <hostname> sshd[3839]: error: fork: Cannot allocate memory
May 4 01:35:29 <hostname> sshd[3839]: error: fork: Cannot allocate memory
May 4 01:35:29 <hostname> sshd[3839]: error: fork: Cannot allocate memory
May 4 02:15:30 <hostname> sshd[3839]: error: fork: Cannot allocate memory
May 4 02:15:33 <hostname> sshd[28264]: error: do_exec_pty: fork: Cannot allocate memory
May 4 02:45:54 <hostname> sshd[3839]: error: fork: Cannot allocate memory
May 4 02:45:59 <hostname> sshd[3839]: error: fork: Cannot allocate memory    

 
But there is no high memory usage.
 
free
-----
        total    used   free      shared  buffers cached
Mem: 396789916 88197380 308592536 196       9696 27343564
-/+ buffers/cache: 60844120 335945796
Swap: 33554428    0     33554428    

cat /proc/meminfo
----------------- 
MemTotal: 396789916 kB
MemFree: 269408468 kB
Buffers: 484268 kB
Cached: 27156144 kB
SwapCached: 0 kB
Active: 114878924 kB
Inactive: 8426840 kB
Active(anon): 95665528 kB
Inactive(anon): 40 kB
Active(file): 19213396 kB
Inactive(file): 8426800 kB
Unevictable: 0 kB
Mlocked: 0 kB
SwapTotal: 33554428 kB
SwapFree: 33554428 kB
Dirty: 276 kB
Writeback: 0 kB
AnonPages: 95665424 kB
Mapped: 228632 kB
Shmem: 196 kB
Slab: 1351312 kB
SReclaimable: 1258460 kB
SUnreclaim: 92852 kB
KernelStack: 63264 kB
PageTables: 222664 kB
NFS_Unstable: 0 kB
Bounce: 0 kB
WritebackTmp: 0 kB
CommitLimit: 231949384 kB
Committed_AS: 101666720 kB
VmallocTotal: 34359738367 kB
VmallocUsed: 1085708 kB
VmallocChunk: 34158261088 kB
HardwareCorrupted: 0 kB
AnonHugePages: 90660864 kB
HugePages_Total: 0
HugePages_Free: 0
HugePages_Rsvd: 0
HugePages_Surp: 0
Hugepagesize: 2048 kB
DirectMap4k: 5816 kB
DirectMap2M: 1814528 kB
DirectMap1G: 400556032 kB 
  

Cause

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Symptoms
Cause
Solution


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.