How to bump ulimit?

Michi Henning michi.henning at canonical.com
Fri Mar 17 02:40:23 UTC 2017


> Would you mind pasting exact command that worked for you from inside a snap?
> 
> In my case ulimit works just fine outside of confinement. For example:
> jacek at laptop:~$ ulimit -n 10240
> jacek at laptop:~$ ulimit -n
> 10240
> 
> But when I try the same when confined I can only go as high as 4096.

$ cat /proc/sys/fs/file-max
1624349
$ ulimit -Hn
65536
$ ulimit -Sn
1024
$ ulimit -Sn 65536
$ ulimit -Sn
65536

This works for me when running a confined shell:

$ snap run —shell mysnap.mycommand

Michi.


> 
> -- 
> Jacek
> 
> 
> On 16/03/17 13:06, Michi Henning wrote:
>> Typing "ubuntu more than 4096 file descriptors” into Google worked well for me.
>> 
>> Michi.
>> 
>> 
>>> On 15 Mar 2017, at 21:56 , Jacek Nykis <jacek.nykis at canonical.com> wrote:
>>> 
>>> Hello,
>>> 
>>> I have a server application that hit max open files limit, which by
>>> default is set to 1024.
>>> 
>>> I'd like to bump that limit significantly but it appears that I can only
>>> go as high as 4096. When I try with value 4097 I'm getting this:
>>> 
>>> 7: ulimit: error setting limit (Operation not permitted)
>>> 
>>> Is there a way to increase ulimit values beyond 4096?
>>> 
>>> -- 
>>> Regards,
>>> Jacek
>>> 
>>> -- 
>>> Snapcraft mailing list
>>> Snapcraft at lists.snapcraft.io
>>> Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/snapcraft
>> 
>> 
> 
> 
> -- 
> Snapcraft mailing list
> Snapcraft at lists.snapcraft.io
> Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/snapcraft





More information about the Snapcraft mailing list