Subject: [alpine-user] Ulimit

From: David Compton <[email-masked]>
Date: Mon, 26 Nov 2018 20:53:28 +0000

Hi,

I have installed Alpine Linux to my Proxmox dev environment in a LXC container and am having an issue raising the file limits.

I have it installed on a reasonably busy haproxy server so I need to increase the file limits but I get the following error from this command:

ulimit -n 90000
ash: error setting limit: Operation not permitted

===

## Increase system file descriptor limit
fs.file-max = 65535

Am I doing something wrong?  Any help appreciated!

David

---

From: Daniel Isaksen <[email-masked]>
Date: Mon, 26 Nov 2018 21:11:35 +0000

Hi David,

This is an LXC limitation.

Given you have the prerequisite LXC >=2.19, try this: `lxc config set containername limits.kernel.nofile 1024`

-----
Sincerely / Med vennlig hilsen,
Daniel Isaksen <[email-masked]> (https://duniel.no)

‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐

---

From: David Compton <[email-masked]>
Date: Mon, 26 Nov 2018 21:17:50 +0000

Hi Daniel,

I can't believe I didn't think to look there first!  I amended the lxc config file with:

lxc.prlimit.nofile: 30000

which is more than enough.  Thank you for the fast reply.  I'm loving Alpine so far, the boot times are unreal, I can see why it's so popular.

David

________________________________
From: Daniel Isaksen <[email-masked]>
Sent: 26 November 2018 21:11
To: David Compton
Cc: [email-masked]
Subject: Re: [alpine-user] Ulimit

Hi David,

Given you have the prerequisite LXC >=2.19, try this: lxc config set containername limits.kernel.nofile 1024

-----

Hi,

ulimit -n 90000

===

David