Browse docs
Build hits open file limits
Operate and recover

Troubleshooting open file limits

Recover when local builds, Playwright runs, or self-hosted CI fail with ENFILE or EMFILE.

Section
Operate and recover
Path
/troubleshooting/open-file-limits

Good for

Community operators and contributors who hit host-level file descriptor limits during build, test, or local rollout work.

What you get

You can distinguish host-level open-file exhaustion from Nanami product bugs and raise the correct limits safely.

Before you start

Shell access to the affected host or runner

Use this guide when build or test tooling fails with ENFILE, EMFILE, or too many open files.

Typical symptoms

This usually appears in:

  • next build for the tenant app, internal company app, docs, or marketing,
  • Playwright e2e runs,
  • Docker or BuildKit builds,
  • self-hosted CI runners with low nofile limits.

Quick diagnostics

bash
ulimit -n
cat /proc/self/limits | grep -i "open files"
  • local dev: soft 65535, hard 65535 or higher,
  • CI or self-hosted runners: soft 65535, hard 1048576.

Temporary shell fix

bash
ulimit -Sn 65535
ulimit -Hn 65535

Persistent service fix

Systemd override:

ini
# /etc/systemd/system/<service>.d/override.conf
[Service]
LimitNOFILE=1048576

Apply:

bash
sudo systemctl daemon-reload
sudo systemctl restart <service>

Docker daemon default:

json
{
  "default-ulimits": {
    "nofile": {
      "Name": "nofile",
      "Soft": 65535,
      "Hard": 1048576
    }
  }
}

Then:

bash
sudo systemctl restart docker

Docker Compose service override:

yaml
ulimits:
  nofile:
    soft: 65535
    hard: 1048576

Next steps

Pick the most useful next step instead of the next random article.