Subject: Re: [vserver] Increasing nofile limit
From: Daniel Urist <durist@ucar.edu>
Date: Mon, 10 Oct 2016 11:29:44 -0600
Mon, 10 Oct 2016 11:29:44 -0600
Thanks, that worked!

For limits that can be controlled by both ulimits and cgroup, which one
takes precedence or is better to use?

On Mon, Oct 10, 2016 at 11:00 AM, Herbert Poetzl <herbert@13thfloor.at>
wrote:

> On Mon, Oct 10, 2016 at 10:03:56AM -0600, Daniel Urist wrote:
> > I have an issue where a mysql process in a vserver is running
> > out of filehandles, but I don't seem able to increase the
> > limit.
>
> > I've added entries for the mysql and root users
> > in /etc/security/limits.conf, and I've tried creating
> > rlimits/nofile in the vserver's etc directory;
>
> Try again with ulimits/nofile :)
>
> > neither have any effect.
>
> > Is there a way to do this with cgroups?
>
> Probably.
>
> > I can't find any documentation on this.
>
> > Also, the nofile limit reported by ulimit is different if
> > I log in to the vserver remotely versus logging in with
> > "vserver enter" from the host.
>
> That is expected, as you bring your host ulimits
> with you into the guest.
>
> Also check that the guest is not lowering the limits
> at some point (session, login, etc) because you won't
> be able to raise them again.
>
> And don't forget to check hard and soft limits.
>
> HTH,
> Herbert
>
> > My environment:
>
> > Debian 8 (jessie)
> > util-vserver v.0.30.216-pre3126-jessie0.1-1
> > kernel 3.18.25-vs2.3.7.4-beng
>


Thanks, that worked! 

For limits that can be controlled by both ulimits and cgroup, which one takes precedence or is better to use?

On Mon, Oct 10, 2016 at 11:00 AM, Herbert Poetzl <herbert@13thfloor.at> wrote:
On Mon, Oct 10, 2016 at 10:03:56AM -0600, Daniel Urist wrote:
> I have an issue where a mysql process in a vserver is running
> out of filehandles, but I don't seem able to increase the
> limit.

> I've added entries for the mysql and root users
> in /etc/security/limits.conf, and I've tried creating
> rlimits/nofile in the vserver's etc directory;

Try again with ulimits/nofile :)

> neither have any effect.

> Is there a way to do this with cgroups?

Probably.

> I can't find any documentation on this.

> Also, the nofile limit reported by ulimit is different if
> I log in to the vserver remotely versus logging in with
> "vserver enter" from the host.

That is expected, as you bring your host ulimits
with you into the guest.

Also check that the guest is not lowering the limits
at some point (session, login, etc) because you won't
be able to raise them again.

And don't forget to check hard and soft limits.

HTH,
Herbert

> My environment:

> Debian 8 (jessie)
> util-vserver v.0.30.216-pre3126-jessie0.1-1
> kernel 3.18.25-vs2.3.7.4-beng