frigate: [Config Support]: Frigate V0.12 crashes and freezes the compleate server!
Describe the problem you are having
Frigate v0.12 crashes the whole server every 1-2 days! I have not eben able to record anything, because the homeassistant server dies compleatly.
Right before the crash no memory or ram problems can be observed. The only thing is that the crashes seem to be occouring in the early morning every time, baut maybe this is just bad luck!
PC is a core I5 Intel cpu with 8 gig ram.
Version
v0.12
Frigate config file
mqtt:
# Required: host name
host: xxx
user: xxx
password: xxx
# Optional: port (default: shown below)
port: 1883
detectors:
cpu1:
type: cpu
num_threads: 1
cpu2:
type: cpu
num_threads: 1
cpu3:
type: cpu
num_threads: 1
birdseye:
enabled: True
mode: continuous
quality: 3
live:
# Optional: Set the height of the live stream. (default: 720)
# This must be less than or equal to the height of the detect stream. Lower resolutions
# reduce bandwidth required for viewing the live stream. Width is computed to match known aspect ratio.
height: 1080
# Optional: Set the encode quality of the live stream (default: shown below
# 1 is the highest quality, and 31 is the lowest. Lower quality feeds utilize less CPU resources.
quality: 2
record:
enabled: True
expire_interval: 1
# Optional: Retention settings for recording
retain:
# Optional: Number of days to retain recordings regardless of events (default: shown below)
# NOTE: This should be set to 0 and retention should be defined in events section below
# if you only want to retain recordings of events.
days: 0
# Optional: Mode for retention. Available options are: all, motion, and active_objects
# all - save all recording segments regardless of activity
# motion - save all recordings segments with any detected motion
# active_objects - save all recording segments with active/moving objects
# NOTE: this mode only applies when the days setting above is greater than 0
mode: all
events:
pre_capture: 20 # Optional: Number of seconds before the event to include (default: shown below)
# Optional: Number of seconds after the event to include (default: shown below)
post_capture: 10
# Optional: Objects to save recordings for. (default: all tracked objects)
objects:
- person
- car
# Optional: Retention settings for recordings of events
retain:
# Required: Default retention days (default: shown below)
default: 5
# Optional: Mode for retention. (default: shown below)
# all - save all recording segments for events regardless of activity
# motion - save all recordings segments for events with any detected motion
# active_objects - save all recording segments for event with active/moving objects
mode: active_objects
# Optional: Per object retention days
objects:
person: 5
car: 1
snapshots:
# Optional: Enable writing jpg snapshot to /media/frigate/clips (default: shown below)
# This value can be set via MQTT and will be updated in startup based on retained value
enabled: True
# Optional: save a clean PNG copy of the snapshot image (default: shown below)
clean_copy: True
# Optional: draw bounding box on the snapshots (default: shown below)
bounding_box: True
# Optional: crop the snapshot (default: shown below)
crop: False
# Optional: Restrict snapshots to objects that entered any of the listed zones (default: no required zones)
required_zones: []
# Optional: Camera override for retention settings (default: global values)
retain:
# Required: Default retention days (default: shown below)
default: 5
# Optional: Per object retention days
objects:
person: 5
car: 1
cameras:
Cam0:
rtmp:
enabled: False
ffmpeg:
inputs:
- path: rtsp://???/stream2 # <-- 102 substream
roles:
- detect
- path: rtsp://???/stream1 # <-- 101 mainstream
roles:
- record
detect:
width: 1920
height: 1080
fps: 5
objects:
track:
- person
filters:
person:
min_area: 10500
max_area: 130000
max_ratio: 0.58
min_ratio: 0.2
zones:
frigate_Sitzplatz:
coordinates: 1134,1080,1920,1080,1920,292,1729,265,1712,0,1388,0,1387,280,1458,281,1505,335,1501,407,1494,478,1383,476,1299,466,1308,334,1363,286,1369,0,1122,0
frigate_Sudseite:
coordinates: 1168,1080,484,1080,412,0,1141,0
frigate_Westseite:
coordinates: 0,1080,504,1080,414,42,0,0
motion:
mask:
- 707,53,707,0,0,0,0,54
- 1320,268,1432,267,1531,278,1574,314,1564,445,1489,515,1405,515,1266,487,1282,286
- 1228,350,1238,491,1053,548,1003,373
Cam1:
rtmp:
enabled: False
ffmpeg:
inputs:
- path: rtsp://???/stream2 # <-- 102 substream
roles:
- detect
- path: rtsp://???/stream1 # <-- 101 mainstream
roles:
- record
detect:
width: 1920
height: 1080
fps: 5
motion:
mask:
- 706,0,710,84,0,113,0,0
Cam2:
rtmp:
enabled: False
ffmpeg:
inputs:
- path: rtsp://??? # <-- 102 substream
roles:
- detect
- path: rtsp://??? <-- 101 mainstream
roles:
- record
detect:
width: 2592
height: 1944
fps: 5
motion:
mask:
- 2554,1846,2560,1899,1904,1897,1904,1829
- 0,392,156,375,279,350,386,320,576,269,595,220,605,41,0,90
- 1392,0,1398,168,915,164,900,0
- 2445,51,2426,264,2123,207,2057,0
- 1963,105,1955,318,1405,292,1403,79
objects:
track:
- person
- car
zones:
frigate_Eingang_vorne:
coordinates: 0,439,228,352,328,369,443,360,563,341,428,533,0,799,0,795
objects:
- car
- person
frigate_Garage_Abfahrt_vorne:
coordinates: 546,362,0,833,0,1420,0,1944,222,1944,929,347
objects:
- car
- person
frigate_Garten_vorne:
coordinates: 249,1417,2571,1944,2592,786,2560,616,2407,446,1985,379,848,339
objects:
- car
- person
frigate_Strasse_vorne:
coordinates: 0,388,192,345,397,301,625,262,980,224,1522,241,2373,328,2592,390,2592,0,0,0
objects:
- car
- person
stationary:
max_frames:
objects:
car: 1000
ffmpeg:
hwaccel_args: -hwaccel vaapi -hwaccel_device /dev/dri/renderD128 -hwaccel_output_format yuv420p
output_args:
record: -f segment -segment_time 10 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c:v copy -c:a aac
Relevant log output
none available
Frigate stats
No response
Operating system
Debian with Homeassistant Supervised / Docker
Install method
HassOS Addon
Coral version
CPU (no coral)
Any other information that may be helpful
v0.11 does work with on problem.
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 2
- Comments: 78 (9 by maintainers)
I got exacty the same problem since 0.14.
Frigate is running in docker in LXC on proxmox. It can’t hold more than 1 day.
I’ve tested different hardware, different kernels : same.
I’ve increased shm_size to 1Gb, to see the difference. Testing beta 0.15 got the same result.
There is an updated driver in 0.12, so I would like to see if we can eliminate that as the source of the problem.
I am running into same issue when using “preset-vaapi” and “openvino” together on k3s cluster with i7-6700T (HD 530 iGPU).
Setting hwaccel_args to blank space
" "seems to switch transcoding from GPU to CPU and leaves GPU for openvino.I don’t know the solution but will try coral edge tpu for detection and leave GPU for transcoding.
Seems the same symptoms I’ve faced on Debian 12 Bookworn and its official kernel, 6.1, with only a difference: in my case the host used to freeze immediateley when the Frigate container restarted.
If your host Is able to run for 2/3 hours before freezing, search the Frigate logs for any useful hint regarding the VAAPI, the Intel graphics driver (iHD or i965) or ffmpeg malfunctioning.
Search instruction to update the kernel version of your distro or, if possibile, update to a newer distro version. In my discovering, kernel 6.5 seems working fine until now, within 3/4 hours of testing in 2 days and with only 2 IP cameras configured. Sorry, I can tell more when my system will be production ready.
@monsieurlatte if it does not exhibit this behavior without hwaccel, you may try updating the host driver and host kernel as that has fixed this for some users