lxc-nofiles-limit

Shibili K

Member
Aug 28, 2018
5
0
21
46
How do I set ulimit -n more than 65536 in a lxc (centos 7 template) running on Proxmox 6.0.4 version?

I can setup unto 65536 using /etc/security/limit.conf. How do I set a value upto 100000?
 
Hi,
try adding the following line to your container configuration file (in /etc/pve/lxc/<ID>.conf):
Code:
lxc.prlimit.nofile: 100000
Then you should be able to raise the limit within the container to 10000 as well.
 
Thank you,
If we add lxc.prlimit.nofile: 100000 in /etc/pve/lxc/<ID>.conf is it required lxc restart? or is it reflect without restart lxc?
 
If you really don't want to restart, use
Code:
pstree -p $(lxc-info -Hp -n <ID>)
to see the process tree of your container, use
Code:
prlimit -p <PID>
prlimit --nofile=100000 -p <PID>
to check and set the limits of the relevant process(es).
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!