On Tue, Sep 18, 2018 at 12:14:11AM +0200, Martin wrote: > I have an issue with Apache's HTTP-Server 2.4. It says 'Resource temporarily > unavailable: AH00159: fork: Unable to fork new process'. I know, there are > some hits with Google, but there is no solution to me. > Systemd knows about a task limit of 6000. mpm_prefork_module is set to > 'ServerLimit 4000' and 'MaxRequestWorkers 4000'. ulimits are set to unlimited. > I also see in the kernel log 'cgroup: fork rejected by pids controller in > /system.slice/apache2.service'. But this does not correlate with the httpd's > messages from above, that comes only from time to time. > Why does this thing stop forking at about 3000 processes? I have a (not just > one) Red Hat 6 in parallel, that one does.
There may be two issues here, my answer refers to 'cgroup: fork rejected by pids controller'. Is there any limit set in pids.max for the apache cgroup under the pids controller? # cd /sys/fs/cgroup/pids/... # cat pids.max How many tasks are assigned to the cgroup? # wc -l tasks Mirko