Skip to content

Conversation

agners
Copy link
Member

@agners agners commented Sep 24, 2025

Proposed change

This PR adds support for configurable ulimits (resource limits) in addon configuration. Add-ons can now specify ulimits in their config.yaml to control system resource limits such as open files, processes, memory locks, and other kernel resource limits.

The implementation supports both simple format:

ulimits:
  nofile: 65535

And detailed format for fine-grained control over soft and hard limits:

ulimits:
  nofile:
    soft: 20000
    hard: 40000

This is e.g. useful for the InfluxDB add-on. InfluxDB does not have options to raise the limit in its configuration. See also hassio-addons/addon-influxdb#383 and influxdata/influxdb#16065.

Type of change

  • New feature (which adds functionality to the supervisor)

Additional information

  • This PR fixes or closes issue: fixes #
  • This PR is related to issue:
  • Link to documentation pull request:
  • Link to cli pull request:
  • Link to client library pull request:

Checklist

  • The code change is tested and works locally.
  • Local tests pass. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.
  • I have followed the development checklist
  • The code has been formatted using Ruff (ruff format supervisor tests)
  • Tests have been added to verify that the new code works.

If API endpoints or add-on configuration are added/changed:

Similar to docker-compose, this adds support for setting ulimits
for addons via the addon config. This is useful e.g. for InfluxDB
which on its own does not support setting higher open file descriptor
limits, but recommends increasing limits on the host.
@agners agners added missing-documentation Added to pull requests that needs a docs, but none is linked new-feature A new feature and removed cla-signed labels Sep 24, 2025
@agners agners requested a review from sairon September 24, 2025 09:26
@agners
Copy link
Member Author

agners commented Sep 24, 2025

So far we relied on the application to raise the limit itself (e.g. Core and Frigate. But setting this as part of the add-on configuration seems a bit less invasive for application which don't support raising on their own, and aligns with what Docker/ Docker compose offers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
missing-documentation Added to pull requests that needs a docs, but none is linked new-feature A new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant