I am trying to create 4000+ docker containers via separate demons (To avoid the barrier of 1023 veth’s per bridge). But I am getting

bash: fork: Cannot allocate memory

error around 1800.I have increased system-wide resources (ulimit) and there are plenty of inodes and memory left. Docker version 1.8 RedHat version 7

  • what does free report ? – Archemar Nov 4 '15 at 12:53
  • Mem: 257742/19147 swap: 16383/0 – lasith Nov 4 '15 at 13:30

Bash does not use vfork and bash is huge.

This causes many forks to comsume a lot of virtual memory.

This is most likely a problem that is caused by the real memory resources on the system than by something you can control via ulimit.

Did you try to use the Bourne Shell or ksh93? Both use vfork() to optimize the performance.

| improve this answer | |

The problem was with the docker zombie process which was eating up the kernel process capacity have been able to solve the problem by increasing kernel.pid_max

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.