Happy new year

Just a short shout out to everbody

So, I hope everyone had a happy holiday season this year with their families 🙂

2016 is coming to an end and my blog is now online for a couple of years. I’m happy that I’m able to write about things that some people might help now or then and so I will keep on doing this in 2017 as well. Also, one of my main goals in 2017 is to make more posts with the same type of quality than in the last years.

But for now, I wish everyone a Happy new Year! We will read us in 2017 🙂

Advertisements

Error inside a LXC container: bash: fork: retry: No child processes

LXC Logo
Image source: wikipedia.org

I’ve started to migrate all my OpenVZ Containers to the LXC container virtualisation. This is because of several reasons which I don’t want to write down in this post. This time I just want to give you a fix for a problem which has bumped up for several containers after their migration on my system.

The error in summary

This error is not a problem of LXC. SystemD is causing this and it’s causing this for a good reason. SystemD wants to protect your system that one or multiple processes are able to spawn other processes without limitation. Now, if you use LXC you will get of course a enormous amount of processes which are started by your container. The container itself is a process on your host system. And this is where the problems of the limitation begins.

The Fix

The fix is rather easy and doesn’t even require a restart of your system or of your containers. As root open the file /etc/systemd/system.conf and enable / set the following value:

DefaultTasksMax=infinity

after you’ve done this, simply let the SystemD reload itself:

root@system:~# systemctl daemon-reload

That’s it. Your containers should now run as expected without the bash: fork error.

Have fun with your containers 🙂