I run a server, mostly for using with random Docker containers and as a Gitlab-CI runner. Every once in a while, when the server has been running for a week or so, I run into process resource limits.
For example, I tried to configure the gitlab runner,
...
Registering runner... succeeded runner=gy1zjHEv
runtime: failed to create new OS thread (have 9 already; errno=11)
runtime: may need to increase max user processes (ulimit -u)
fatal error: newosproc
...
Or a couple minutes later, trying to install the strace
utility
(in dutch)
...
Instellen van strace (4.21-1ubuntu1) ...
Bezig met afhandelen van triggers voor man-db (2.8.3-2ubuntu0.1) ...
/usr/bin/mandb: fork failed: Hulpbron is tijdelijk onbeschikbaar
/usr/bin/mandb: fork failed: Hulpbron is tijdelijk onbeschikbaar
/usr/bin/mandb: fork failed: Hulpbron is tijdelijk onbeschikbaar
/usr/bin/mandb: fork failed: Hulpbron is tijdelijk onbeschikbaar
/usr/bin/mandb: fork failed: Hulpbron is tijdelijk onbeschikbaar
/usr/bin/mandb: fork failed: Hulpbron is tijdelijk onbeschikbaar
/usr/bin/mandb: fork failed: Hulpbron is tijdelijk onbeschikbaar
/usr/bin/mandb: fork failed: Hulpbron is tijdelijk onbeschikbaar
/usr/bin/mandb: fork failed: Hulpbron is tijdelijk onbeschikbaar
/usr/bin/mandb: fork failed: Hulpbron is tijdelijk onbeschikbaar
/usr/bin/mandb: fork failed: Hulpbron is tijdelijk onbeschikbaar
/usr/bin/mandb: fork failed: Hulpbron is tijdelijk onbeschikbaar
/usr/bin/mandb: fork failed: Hulpbron is tijdelijk onbeschikbaar
/usr/bin/mandb: fork failed: Hulpbron is tijdelijk onbeschikbaar
Bezig met afhandelen van triggers voor libc-bin (2.27-3ubuntu1) ...
It translates to fork failed: Resource is temporarily unavailable
Something is causing fork
to throw EAGAIN
.
Ulimit
$ ulimit -u
core file size (blocks, -c) 0
data seg size (kbytes, -d) unlimited
scheduling priority (-e) 0
file size (blocks, -f) unlimited
pending signals (-i) 1029355
max locked memory (kbytes, -l) 16384
max memory size (kbytes, -m) unlimited
open files (-n) 32768
pipe size (512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
real-time priority (-r) 0
stack size (kbytes, -s) 8192
cpu time (seconds, -t) unlimited
max user processes (-u) 62987
virtual memory (kbytes, -v) unlimited
file locks (-x) unlimited
My max user processes is set to 62987
, I'm nowhere near using 62,000 processes. The gitlab exception also showed that the current amount of processes is at 9, which is 'too high' supposedly?
How is it possible that clone is running into a process resource limit if I'm nowhere near the configured ulimit?