[Support]: Frigate suddenly using high/all CPU avaliable after hours since started #9975
-
Describe the problem you are havingI've recently seen that after some time since Frigate is started, it suddenly makes my whole Home Assistant setup to "almost an halt" because all CPU is maxed out, not bu the Frigate container it self, but in a combination with homeassistant container. Not sure what to provide here to make the issue more clear, but I've attached some screenshots of the CPU usage/Glances, and logs from Host/and Frigate. Home Asisistant host started around 08:25 today (logs are UTC-time, meaning -1h = 09:15 UTC=10:15 local) Stopping Frigate addon does often not lower the CPU usage from homeassistant container at once, but after some time if stabilizes back to normal. Restarting Home Assistant clears the problem automatically.
Thanks for any assistance, Version0.13.2-6476F8A Frigate config filemqtt:
enabled: true
host: 192.168.1.197
port: 1883
user: XXX
password: XXX
database:
path: /config/frigate.db
go2rtc:
streams:
camera_dor:
- rtsp://XXX:[email protected]/stream1
- "ffmpeg:camera_dor#audio=aac"
camera_ute:
- rtsp://XXX:[email protected]/stream1
- "ffmpeg:camera_ute#audio=aac"
camera_3:
- rtsp://XXX:[email protected]/live0
cameras:
camera_dor:
ffmpeg:
output_args:
record: preset-record-generic-audio-aac
inputs:
- path: rtsp://XXX:[email protected]/stream1
roles:
- record
- detect
detect:
enabled: true
fps: 3
motion:
mask:
- 0,0,2560,0,2560,358,1690,334,1188,272,976,398,206,618,0,666
threshold: 50
improve_contrast: false
camera_ute:
ffmpeg:
output_args:
record: preset-record-generic-audio-aac
inputs:
- path: rtsp://XXX:[email protected]/stream1
roles:
- record
- detect
detect:
enabled: true
fps: 3
motion:
mask:
- 484,882,824,876,816,628,2204,634,2560,906,2560,0,0,0,0,1440
threshold: 50
improve_contrast: false
camera_3:
ffmpeg:
output_args:
record: preset-record-generic-audio-aac
inputs:
- path: rtsp://XXX:[email protected]/live0
roles:
- record
detect:
enabled: false
fps: 3
snapshots:
enabled: true
record:
enabled: True
retain:
days: 1
mode: all
events:
retain:
default: 3
mode: active_objects
birdseye:
enabled: false Relevant log output2024-02-22 07:26:34.408657808 [INFO] Preparing Frigate...
2024-02-22 07:26:34.591909705 [INFO] Starting Frigate...
2024-02-22 07:26:38.245748917 [2024-02-22 08:26:38] frigate.app INFO : Starting Frigate (0.13.2-6476f8a)
2024-02-22 07:26:38.245876592 [2024-02-22 08:26:38] frigate.app INFO : Creating directory: /tmp/cache
2024-02-22 07:26:42.860632564 [2024-02-22 08:26:42] peewee_migrate.logs INFO : Starting migrations
2024-02-22 07:26:42.899311790 [2024-02-22 08:26:42] peewee_migrate.logs INFO : There is nothing to migrate
2024-02-22 07:26:42.941334983 [2024-02-22 08:26:42] frigate.app INFO : Recording process started: 475
2024-02-22 07:26:42.953332126 [2024-02-22 08:26:42] frigate.app INFO : go2rtc process pid: 89
2024-02-22 07:26:43.012948766 [2024-02-22 08:26:43] detector.cpu INFO : Starting detection process: 485
2024-02-22 07:26:43.021143651 [2024-02-22 08:26:43] frigate.app INFO : Output process started: 487
2024-02-22 07:26:43.063098747 [2024-02-22 08:26:43] frigate.detectors WARNING : CPU detectors are not recommended and should only be used for testing or for trial purposes.
2024-02-22 07:26:43.410559542 [2024-02-22 08:26:43] frigate.app INFO : Camera processor started for camera_dor: 501
2024-02-22 07:26:43.413482671 [2024-02-22 08:26:43] frigate.app INFO : Camera processor started for camera_ute: 502
2024-02-22 07:26:43.431364895 [2024-02-22 08:26:43] frigate.app INFO : Camera processor started for camera_3: 504
2024-02-22 07:26:43.448637469 [2024-02-22 08:26:43] frigate.app INFO : Capture process started for camera_dor: 506
2024-02-22 07:26:43.465651503 [2024-02-22 08:26:43] frigate.app INFO : Capture process started for camera_ute: 510
2024-02-22 07:26:43.483828135 [2024-02-22 08:26:43] frigate.app INFO : Capture process started for camera_3: 514
2024-02-22 09:15:24.519317453 [2024-02-22 10:15:24] frigate.video ERROR : camera_3: Unable to read frames from ffmpeg process.
2024-02-22 09:15:24.536307977 [2024-02-22 10:15:24] frigate.video ERROR : camera_3: ffmpeg process is not running. exiting capture thread...
2024-02-22 09:15:32.764873181 [2024-02-22 10:15:32] watchdog.camera_3 ERROR : Ffmpeg process crashed unexpectedly for camera_3.
2024-02-22 09:15:32.764879791 [2024-02-22 10:15:32] watchdog.camera_3 ERROR : The following ffmpeg logs include the last 100 lines prior to exit.
2024-02-22 09:15:32.764887331 [2024-02-22 10:15:32] ffmpeg.camera_3.detect ERROR : [segment @ 0x555f0297f000] Timestamps are unset in a packet for stream 0. This is deprecated and will stop working in the future. Fix your code to set the timestamps properly
2024-02-22 09:15:32.764916947 [2024-02-22 10:15:32] ffmpeg.camera_3.detect ERROR : [rtsp @ 0x555f0290f100] CSeq 103 expected, 0 received.
2024-02-22 09:15:32.764920443 [2024-02-22 10:15:32] ffmpeg.camera_3.detect ERROR : [h264 @ 0x555f02937f40] cabac decode of qscale diff failed at 61 45
2024-02-22 09:15:32.764961995 [2024-02-22 10:15:32] ffmpeg.camera_3.detect ERROR : [h264 @ 0x555f02937f40] error while decoding MB 61 45, bytestream 462
2024-02-22 09:15:32.764965389 [2024-02-22 10:15:32] ffmpeg.camera_3.detect ERROR : rtsp://*:*@192.168.1.182/live0: corrupt decoded frame in stream 0
2024-02-22 09:15:32.765001747 [2024-02-22 10:15:32] ffmpeg.camera_3.detect ERROR : [h264 @ 0x555f02937f40] error while decoding MB 91 58, bytestream -14
2024-02-22 09:15:32.765004802 [2024-02-22 10:15:32] ffmpeg.camera_3.detect ERROR : rtsp://*:*@192.168.1.182/live0: corrupt decoded frame in stream 0 FFprobe output from your cameracamera_ute and camera_dor:
Stream 0:
Return Code: 0
Video:
Codec: H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10
Resolution: 2560x1440
FPS: 15/1
Audio:
Codec: PCM A-law / G.711 A-law
camera_3:
Stream 0:
Return Code: 0
Video:
Codec: H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10
Resolution: 1920x1080
FPS: 15/1
Audio:
Codec: AAC (Advanced Audio Coding) Frigate statsNo response Operating systemHassOS Install methodHassOS Addon Coral versionCPU (no coral) Network connectionMixed Camera make and modelTP-Link Tapo C320WS (ute/dor) / Eufy Indoor Cam Pan&Tilt (3) Any other information that may be helpfulNo response |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 16 replies
-
a screenshot of the frigate system page while this is happening would be a good start |
Beta Was this translation helpful? Give feedback.
-
Currently ongoing, screenshot attached. |
Beta Was this translation helpful? Give feedback.
Oh I just realized you're running detect at 30 and 20 fps, this is highly discouraged. The detect fps does not need to match the camera fps