I had the same problem and used Claude to get me out of the mess. It took a lot of iterations back and forth, but in the end I succeeded. Here’s Claude’s final procedure:
Fix: InfluxDB "Too Many Open Files" on Home Assistant
Symptoms
InfluxDB add-on fails to start and the log shows repeated errors like:
Cannot read corrupt tsm file, renaming ... error="init: read tombstones: too many open files"
http: Accept error: accept tcp 0.0.0.0:8086: accept4: too many open files; retrying in 5ms
Root Cause
Starting with Home Assistant OS 16, the default file descriptor (open files) limit for
add-on containers was lowered to 1024. This is too low for InfluxDB, which needs to open
many files simultaneously on startup — one for each TSM data file, WAL file, and shard.
Over time, InfluxDB's internal monitoring database (_internal) accumulates hundreds of
shard folders, each containing multiple files. Combined with the lowered HAOS 16 limit,
InfluxDB can no longer open all required files on startup and fails.
Note: PR #395 on the hassio-addons/addon-influxdb GitHub repository proposes a proper
fix by making the file handler limit user-configurable. As of add-on version 5.0.2 this
fix has not yet been released.
The workaround in this guide deletes the _internal database, which only stores
InfluxDB's own internal metrics and has no value for Home Assistant users. This reduces
the number of files InfluxDB needs to open on startup back below the 1024 limit.
Requirements
- Home Assistant OS
- InfluxDB installed as an add-on
- Advanced Mode enabled on your HA user profile
- Advanced SSH & Web Terminal add-on installed (only visible in the store when Advanced Mode is on)
Step 0 — Enable Advanced Mode
- Click your username in the bottom left of the HA sidebar
- Scroll down to find Advanced Mode
- Toggle it on
This unlocks additional add-ons in the store, including the Advanced SSH & Web Terminal
add-on needed for this procedure.
Step 1 — Install Advanced SSH & Web Terminal
If not already installed:
- Go to Settings → Add-ons → Add-on Store
- Search for Advanced SSH & Web Terminal
- Install it and start it
- Enable Show in sidebar
Step 2 — Disable protection mode
This is required to get Docker access:
- Go to Settings → Add-ons → Advanced SSH & Web Terminal
- Click the Info tab
- Turn off Protection mode
- Restart the add-on
Remember to turn protection mode back on after you're done.
Step 3 — Start InfluxDB
InfluxDB needs to be running for the next step. Even though it's broken, the container
still starts:
- Go to Settings → Add-ons → InfluxDB → Start
Step 4 — Open the Advanced SSH terminal
Click Advanced SSH in the HA sidebar. You'll see a terminal with a prompt like:
➜ ~
Step 5 — Verify Docker access
docker ps -a | grep influx
You should see a line with addon_XXXXXXXXX_influxdb. If you see it, proceed.
Step 6 — Delete the _internal database
Run this command immediately after InfluxDB starts (before it fully loads):
docker exec addon_XXXXXXXXX_influxdb rm -rf /data/influxdb/data/_internal
Replace XXXXXXXXX with the actual add-on ID from the previous step.
Step 7 — Verify the deletion
docker exec addon_XXXXXXXXX_influxdb ls /data/influxdb/data/
You should see only your data folder (e.g. Homeassistant) and no _internal folder.
Step 8 — Restart InfluxDB cleanly
- Go to Settings → Add-ons → InfluxDB
- Click Restart
Check the log — it should now start cleanly with no too many open files errors.
Step 9 — Prevent it from happening again
Make sure the internal monitoring store is disabled:
- Go to Settings → Add-ons → InfluxDB → Configuration tab
- Find INFLUXDB_MONITOR_STORE_ENABLED and set it to
false
- Save and restart
This prevents _internal from ever being recreated.
Step 10 — Re-enable protection mode
- Go to Settings → Add-ons → Advanced SSH & Web Terminal → Info tab
- Turn Protection mode back on
- Restart the add-on
Verify InfluxDB is receiving data
Direct browser access to Chronograf (port 8888) may not work. Instead, open the
InfluxDB web UI from within Home Assistant:
- Go to Settings → Add-ons → InfluxDB
- Click the Open Web UI button
- This opens the Chronograf interface
- Go to Explore in the left sidebar
- Select your database (e.g.
Homeassistant)
- Check that recent timestamps are appearing — if they are, data is flowing in correctly
Notes
- This procedure does not delete your Home Assistant sensor data in InfluxDB
- Only the
_internal folder (InfluxDB's own internal metrics) is removed
- Your automations, dashboards and HA configuration are completely untouched
- Tested on: Home Assistant OS 17.3, InfluxDB add-on 5.0.2, Odroid N2+