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– Archemar2015年11月04日 12:53:38 +00:00Commented Nov 4, 2015 at 12:53
-
Mem: 257742/19147 swap: 16383/0lasith– lasith2015年11月04日 13:30:57 +00:00Commented Nov 4, 2015 at 13:30
2 Answers 2
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.
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