Docker on Arch

I’ve got a job! Since Jan 1st, I am developing scala for HANA Vora at SAP. Getting used to scala was easier than I dared to wish - the language is so well constructed that it feels almost natural writing it. And I even got to bring my favourite distro - Arch Linux - as a work environment. Which brings me to the point of today’s (and probably this quarter’s) post: Running heavily threaded applications (e.g., JVM languages) in docker on Arch. Should be no problem at all, right?

It’s not a problem - as long as you configure your system properly. Which you are supposed to do when running Arch. Well, I did not configure anything and ran into

java.lang.OutOfMemoryError: unable to create new native Thread

and (with more C-like languages):

fork: retry: Resource temporarily unavailable

It turns out that Arch configures systemd with a maximum of 500 child processes per unit, which is exhausted rather sooner than later. I never paid too much attention to

systemctl status

either, it seems, because there is a pretty prominent indicator saying something along the lines of

14 tasks (500 max)

Never stop learning…