Files
archived-teslamate/website/docs/configuration
Jakob Lichterfeld 0973b497ed feat: Add ulimit cap to prevent memory bloat in some misconfigured versions of Docker/containerd Hosts (e.g. on Debian 13)
On certain systems (e.g., Debian 13 with modern container runtimes), a very high default `nofiles` ulimit can cause the Erlang VM (beam.smp) to pre-allocate excessive amounts of memory, leading to container crashes.

This change introduces a safeguard directly into the entrypoint script:
- It caps the soft `ulimit -n` to a configurable maximum, defined by the `ULIMIT_MAX_NOFILE` environment variable (defaults to 65536).
- This behavior can be disabled by setting `ULIMIT_MAX_NOFILE=0`.
- The new environment variable has been added to the documentation.

To satisfy ShellCheck (SC3045), the script's shebang is set to `#!/usr/bin/env dash`, as `ulimit -n` is a common but not strictly POSIX-compliant extension.
2025-11-05 16:45:52 +01:00
..