[lxc-users] Unable to fork - LXD process limit?

Phillips, Julian julian.phillips at roke.co.uk
Wed Jun 14 16:53:12 UTC 2017


It appears that the issue was due to the centos image imposing a 1024 softlimit on the number of processes.  I wouldn't expect limits configured inside a container to cause affects across containers, but at least I have been able to increase the limit in all the containers and can now run as many processes as needed.

From: Phillips, Julian
Sent: 14 June 2017 10:36
To: LXC users mailing-list
Subject: RE: [lxc-users] Unable to fork - LXD process limit?

It's 1024 total across all containers.  Yesterday I was able to cause the same problem with only two containers (both CentOS 6.8 un-customized).  I started 1024 processes in container 2, and was unable to run "su - user" in container 1.  The only thing I did to the host after install was to update to 16.04.2 (install image was 16.04).

(sorry for top posting ...)

From: lxc-users [mailto:lxc-users-bounces at lists.linuxcontainers.org] On Behalf Of Stéphane Graber
Sent: 13 June 2017 16:05
To: LXC users mailing-list
Subject: Re: [lxc-users] Unable to fork - LXD process limit?

On Tue, Jun 13, 2017 at 08:56:25AM +0000, Phillips, Julian wrote:
> Hello,
>
> I'm trying to setup LXD (2.0.9) on Ubuntu 16.04 to run 32 Centos 6 containers, but I seem to be running into a process limit?
>
> After building the containers, if I run "lxc exec container -- su - user" then I get "can not fork user shell: Resource temporarily unavailable". The only thing I can see that might be related is that /sys/fs/cgroups/pids/lxc/pids.current is a bit over 1024, which sounds like I might be hitting a 1024 limit. However /sys/fs/cgroups/pids/lxc/pids.max is "max", and I don't know what else might apply. Does anyone know if there is a limit I need to change somewhere to allow LXD to run more than 1024 processes at once?
>
> Yours hopefully,
> Julian

With 32 containers at 1024 processes, that's 32k which is the global
pidmax for most Linux distributions.

You may want to bump the value in /proc/sys/kernel/pid_max on the host
to something significantly larger than its current value.


--
Stéphane Graber
Ubuntu developer
http://www.ubuntu.com<http://www.ubuntu.com>

________________________________________
Roke Manor Research Limited, Romsey, Hampshire, SO51 0ZN, United Kingdom.Part of the Chemring Group. 
Registered in England & Wales. Registered No: 00267550
http://www.roke.co.uk

Please update your address book. Roke is currently transitioning to its original brand and will no longer 
be branded under Chemring Technology Solutions. Email addresses of Roke staff have therefore been changed 
from firstname.surname at chemringts.com to firstname.surname at roke.co.uk – please use this updated format 
with immediate effect.

________________________________________
The information contained in this e-mail and any attachments is proprietary to Roke Manor Research Limited and 
must not be passed to any third party without permission. This communication is for information only and shall 
not create or change any contractual relationship.
________________________________________
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20170614/6e7b1f1d/attachment.html>


More information about the lxc-users mailing list