[Bug]: Frigate under HAOS 16.0 crash due to "Too many open files" (ulimit) #19073
-
Checklist
Describe the problem you are havingFrigate running under Home Assistant OS v16.0 is reporting that the system is running out of file handlers. The WebUI is unable to load, and it will crash loop if the watchdog is enabled. Steps to reproduce
Version0.16.0-beta3 In which browser(s) are you experiencing the issue with?No response Frigate config file#The config file was working with the previous HAOS. Regular config with a Coral TPU, no custom models.
mqtt:
enabled: true
host: homeassistant.local
user: mqtt_user_login
password: xxxxxxxxxxxxxxxxxx
ffmpeg:
hwaccel_args: preset-vaapi
detectors:
coral:
type: edgetpu
device: usb
record:
enabled: true
sync_recordings: true
retain:
days: xx
mode: motion
alerts:
retain:
days: xx
detections:
retain:
days: xx
snapshots:
enabled: true
retain:
default: xx
cameras:
camera_1:
enabled: true
detect:
enabled: true
width: 1280
height: 720
fps: 5
ffmpeg:
inputs:
- path:
rtsp://admin:xxxxxxxxxxxxxxx@192.168.xxx.xxx/cam/realmonitor?channel=1&subtype=0 # this is the main stream
roles:
- detect
### other 8 cameras removed. Similar config.
semantic_search:
enabled: false
reindex: false
model_size: small
detect:
enabled: true
version: 0.16-0docker-compose file or Docker CLI commandN/ARelevant Frigate log output2025-07-09 20:30:59.907740762 [2025-07-09 22:30:59] frigate.util.config INFO : Checking if frigate config needs migration...
2025-07-09 20:30:59.952438888 [2025-07-09 22:30:59] frigate.util.config INFO : copying config as backup...
2025-07-09 20:30:59.973396244 [2025-07-09 22:30:59] frigate.util.config INFO : Finished frigate config migration...
2025-07-09 20:31:00.022433668 [2025-07-09 22:31:00] frigate.app INFO : Starting Frigate (0.15.0-6cb5cfb)
2025-07-09 20:31:00.022456214 [2025-07-09 22:31:00] frigate.app INFO : Creating directory: /tmp/cache
2025-07-09 20:31:00.044997483 [2025-07-09 22:31:00] peewee_migrate.logs INFO : Starting migrations
2025-07-09 20:31:00.045405111 [2025-07-09 22:31:00] peewee_migrate.logs INFO : There is nothing to migrate
2025-07-09 20:31:00.051155045 [2025-07-09 22:31:00] frigate.app INFO : Recording process started: 355
2025-07-09 20:31:00.056903572 [2025-07-09 22:31:00] frigate.app INFO : Review process started: 357
2025-07-09 20:31:00.060921692 [2025-07-09 22:31:00] frigate.app INFO : go2rtc process pid: 98
2025-07-09 20:31:00.075871021 [2025-07-09 22:31:00] detector.coral INFO : Starting detection process: 371
2025-07-09 20:31:00.325385551 Traceback (most recent call last):
2025-07-09 20:31:00.325390648 File "/usr/lib/python3.9/runpy.py", line 197, in _run_module_as_main
2025-07-09 20:31:00.325394066 return _run_code(code, main_globals, None,
2025-07-09 20:31:00.325398994 File "/usr/lib/python3.9/runpy.py", line 87, in _run_code
2025-07-09 20:31:00.325402234 exec(code, run_globals)
2025-07-09 20:31:00.325404638 File "/opt/frigate/frigate/__main__.py", line 64, in <module>
2025-07-09 20:31:00.325422861 main()
2025-07-09 20:31:00.325425134 File "/opt/frigate/frigate/__main__.py", line 60, in main
2025-07-09 20:31:00.325427830 FrigateApp(config).start()
2025-07-09 20:31:00.325430005 File "/opt/frigate/frigate/app.py", line 610, in start
2025-07-09 20:31:00.325432123 self.start_camera_capture_processes()
2025-07-09 20:31:00.325434585 File "/opt/frigate/frigate/app.py", line 440, in start_camera_capture_processes
2025-07-09 20:31:00.325461326 self.frame_manager.create(f"{config.name}_frame{i}", frame_size)
2025-07-09 20:31:00.325463681 File "/opt/frigate/frigate/util/image.py", line 810, in create
2025-07-09 20:31:00.325466732 File "/opt/frigate/frigate/util/image.py", line 789, in __init__
2025-07-09 20:31:00.325469137 File "/usr/lib/python3.9/multiprocessing/shared_memory.py", line 114, in __init__
2025-07-09 20:31:00.325490902 OSError: [Errno 24] Too many open files
2025-07-09 20:31:00.346139370 Too many open files (src/ipc_listener.cpp:299)
2025-07-09 20:31:00.346144047 Fatal Python error: Aborted
2025-07-09 20:31:00.346146013
2025-07-09 20:31:00.346148210 Thread 0x00007f25477fe6c0 (most recent call first):
2025-07-09 20:31:00.346150380 File "/usr/lib/python3.9/selectors.py", line 416 in select
2025-07-09 20:31:00.346152474 File "/usr/lib/python3.9/multiprocessing/connection.py", line 931 in wait
2025-07-09 20:31:00.346154813 File "/usr/lib/python3.9/multiprocessing/connection.py", line 424 in _poll
2025-07-09 20:31:00.346157193 File "/usr/lib/python3.9/multiprocessing/connection.py", line 257 in poll
2025-07-09 20:31:00.346159408 File "/usr/lib/python3.9/multiprocessing/queues.py", line 113 in get
2025-07-09 20:31:00.346161944 File "/opt/frigate/frigate/object_processing.py", line 792 in run
2025-07-09 20:31:00.346164210 File "/usr/lib/python3.9/threading.py", line 954 in _bootstrap_inner
2025-07-09 20:31:00.346166202 File "/usr/lib/python3.9/threading.py", line 912 in _bootstrapRelevant go2rtc log outputN/AOperating systemHome Assistant OS Install methodHome Assistant Add-on Network connectionWired Camera make and modelDahua Screenshots of the Frigate UI's System metrics pagesN/A Any other information that may be helpfulNo response |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
|
This is a known issue with HAOS 16. Frigate hasn't changed, so it has something to do with HAOS 16's changes. You can follow the issue here: home-assistant/operating-system#4110 |
Beta Was this translation helpful? Give feedback.
-
|
Thanks! Sorry, could not find any associated issues. |
Beta Was this translation helpful? Give feedback.
-
|
I just had this problem and came across this bug. I'd like to point out that I have upgraded both the system and frigate, so I don't know if this is a new limit or not. I run a home frigate with 8 cameras and home-assistant, and frigate uses just over 1024 files. The solution was to increase max open files for all systemd units: remember to run apparently changing systemd did not work for me. So that is my solution, but it seems multiple distributions are moving to tighter default limits than what you were used to. You might want to try and bring that number of fd down if you can, or mention it in the documentation somewhere. |
Beta Was this translation helpful? Give feedback.
This is a known issue with HAOS 16. Frigate hasn't changed, so it has something to do with HAOS 16's changes.
You can follow the issue here: home-assistant/operating-system#4110