k3s influxdb too many files
It's been about 3 days that I'm trying to fix an issue that I encountered using k3s on alpine as host: I have an influxdb instance inside a container managed by k3s that complains about
too many open files; the
ulimit -a output inside the container gives me this:
bash-5.1# ulimit -a real-time non-blocking time (microseconds, -R) unlimited core file size (blocks, -c) 0 data seg size (kbytes, -d) unlimited scheduling priority (-e) 0 file size (blocks, -f) unlimited pending signals (-i) 14891 max locked memory (kbytes, -l) 64 max memory size (kbytes, -m) unlimited open files (-n) 1024 pipe size (512 bytes, -p) 8 POSIX message queues (bytes, -q) 819200 real-time priority (-r) 0 stack size (kbytes, -s) 8192 cpu time (seconds, -t) unlimited max user processes (-u) 14891 virtual memory (kbytes, -v) unlimited file locks (-x) unlimited
So, on the host, I added to
fs.file-max = 6000000 fs.nr_open = 6000000
shadow package, added to
* soft nofile 20000 * hard nofile 30000
This approach drove me to the situation where if I ssh into the machine my user gets the same limits than the reported above, but if I
su on a user (even myself) the configured limits are satisfied. Instead the container seems not affected by the changes.
I tried also setting the
rc_ulimit to the
/etc/rc.conffile like this:
rc_ulimit="-Hn 30000" rc_ulimit="-Sn 20000"
but nothing changed, I have the same behaviour than not setting them.
Are there any suggestions about this?
Thanks a lot for your time