HAProxy Cannot Raise FD Limit in Incus on Void Linux
By chimo on (updated on )I ran into a “cannot raise FD limit” error when starting HAProxy after migrating from Archlinux to Void Linux. This post describes how I managed to get around that.
Turns out Archlinux’s systemd unit file for incus contains:
# ...
LimitNOFILE=1048576
# ...
Which increases the maximum number of files Incus can open.
As far as I know, to achieve something similar on Void Linux, add the following two “ulimit” lines to “/var/service/incus/run”:
#!/bin/sh
exec 2>&1
ulimit -Hn 1048576
ulimit -Sn 1048576
[ -r conf ] && . ./conf
exec /usr/libexec/incus/incusd --group _incus-admin ${OPTS:- --verbose}
References: