I just wanted to check something in Grafana and by that found out that my influxdb addon (addon in HA) is not working anymore.
No real clue when this started … .but at least a few weeks back it was working fine
Error says: Accept error: accept tcp [::]:8086: accept4: too many open files; retrying in 1s
2025/09/06 09:39:03 http: Accept error: accept tcp [::]:8086: accept4: too many open files; retrying in 1s
i have the same issue, and I think there are dozen more, they just do not check the influx data reguraly… it is a pittty that no solution is yet provided for it…
#!/bin/sh
IMAGE="ghcr.io/hassio-addons/influxdb/amd64:5.0.2"
ADDON="a0d7b954_influxdb"
echo "== Pull clean original image =="
docker pull "$IMAGE"
echo "== Create Dockerfile patch =="
rm -rf /mnt/data/influxdb-image-patch
mkdir -p /mnt/data/influxdb-image-patch
cat > /mnt/data/influxdb-image-patch/Dockerfile <<'DOCKER'
FROM ghcr.io/hassio-addons/influxdb/amd64:5.0.2
RUN if [ -f /etc/services.d/influxdb/run ]; then \
sed -i '/ulimit -S -n 65536/d' /etc/services.d/influxdb/run && \
sed -i '/ulimit -Sn 65536/d' /etc/services.d/influxdb/run && \
sed -i '/exec influxd/i ulimit -S -n 65536' /etc/services.d/influxdb/run && \
grep -n 'ulimit\|exec influxd' /etc/services.d/influxdb/run; \
else \
echo "ERROR: /etc/services.d/influxdb/run not found" && exit 1; \
fi
DOCKER
echo "== Build patched image using same local tag =="
docker build -t "$IMAGE" /mnt/data/influxdb-image-patch
echo "== Restart InfluxDB add-on =="
ha addons restart "$ADDON"
echo "== Wait =="
sleep 25
echo "== Verify =="
docker exec "addon_$ADDON" sh -c '
pid=$(pidof influxd || true)
if [ -z "$pid" ]; then
echo "ERROR: influxd not running"
exit 1
fi
echo "PID=$pid"
cat /proc/$pid/limits | grep "open files"
echo FD_COUNT
ls /proc/$pid/fd | wc -l
'
echo "== Done =="
I temporary fixed it by running this quick and dirty hotfix script (provided by chatgpt...) under Home Assistant Operating System 17.3 to be able to run newest kernel with fix for copy fail exploit.
Maybe it help you until real fix for the addon is there
Make backup. Use on your own rist