Files
arthur-os/install/config/increase-fd-limit.sh
T
twagner12andGitHub c7c3ef87af Fix DefaultLimitNOFILE typo so fd-limit raise actually applies (#5661)
`DefaultLimitNOFILESoft` is not a valid systemd configuration key.
systemd silently ignores it and emits this warning on every boot,
for both the system manager (PID 1) and the user manager:

  Unknown key 'DefaultLimitNOFILESoft' in section [Manager], ignoring.

The consequence is that the script's stated goal of raising the soft
fd limit from 1024 to 65536 has not actually been happening: dev
tools (VS Code, Docker, dev servers, databases) continue to run with
systemd's default 1024 soft limit.

The valid key is `DefaultLimitNOFILE`, which accepts either a single
value (sets both soft and hard) or `SOFT:HARD`. Using `65536:524288`
raises the soft limit while preserving systemd's typical 524288
hard-limit default — using the bare `=65536` form would lower the
hard limit, which would be a regression.

After this change and `systemctl daemon-reexec` on both managers,
`systemctl show | grep DefaultLimitNOFILE` reports:

  DefaultLimitNOFILE=524288     (hard)
  DefaultLimitNOFILESoft=65536  (soft, derived display attribute)

and the boot-time "Unknown key" warnings disappear.

(The typo likely originated from someone reading `systemctl show`
output, where `DefaultLimitNOFILESoft=` appears as a read-only
display attribute for the soft component of the parsed limit.
It looks like a config key but isn't.)
2026-05-08 13:22:29 +02:00

12 lines
467 B
Bash

# Raise soft file descriptor limit from systemd's default of 1024 to 65536
# so dev tools (VS Code, Docker, dev servers, databases) get the headroom they need
sudo mkdir -p /etc/systemd/system.conf.d /etc/systemd/user.conf.d
sudo tee /etc/systemd/system.conf.d/99-omarchy-nofile.conf >/dev/null <<'EOF'
[Manager]
DefaultLimitNOFILE=65536:524288
EOF
sudo cp /etc/systemd/system.conf.d/99-omarchy-nofile.conf \
/etc/systemd/user.conf.d/99-omarchy-nofile.conf