[Support]: Detection stuck in loop, followed by unprocessed segments #20005
Replies: 4 comments 1 reply
-
Based on your logs, you're experiencing a classic pattern where the detection process gets stuck in a restart loop, followed by unprocessed recording segments accumulating in cache. The warning message "Too many unprocessed recording segments in cache" indicates that Frigate is keeping only the 6 most recent segments and discarding older ones (1)(2)(3). This happens when the detect stream has issues processing frames, causing a backlog. Here's what's happening:
Key Configuration Issues to Check: Your detect FPS is set to the default 5 FPS (4). Consider adjusting the detect configuration: detect:
fps: 5 # Optional: desired fps for your camera for the input with the detect role (default: shown below)
# NOTE: Recommended value of 5. Ideally, try and reduce your FPS on the camera. Stationary Object Tracking: Your config doesn't specify stationary object settings. The default behavior tracks objects indefinitely, which can cause detection to get stuck (4): detect:
stationary:
interval: 50 # Optional: Frequency for confirming stationary objects (default: same as threshold)
threshold: 50 # Optional: Number of frames without a position change for an object to be considered stationary (default: 10x the frame rate or 10s) Troubleshooting Steps:
The pattern in your logs matches other users who experienced similar detection loops with Coral TPU setups (1)(3). A restart typically resolves it temporarily, but the underlying cause needs addressing through configuration optimization. 📚 Sources:
Have another question? Just tag @inkeep. |
Beta Was this translation helpful? Give feedback.
-
This is a problem that some users experience when running Frigate in a VM with USB coral. Sometimes passing the entire USB BUS in helps improve it |
Beta Was this translation helpful? Give feedback.
-
@NickM-27 i have the same issue "Too many unprocessed recording segments in cache" and i'm not using USB coral. I have NVIDIA GPU. When i restart docker it starts working until it does not. |
Beta Was this translation helpful? Give feedback.
-
Wrong script used, argh#, now is working, thanks V |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Describe the problem you are having
After running for a while, eventually detection gets stuck. The logs show a restart loop on the detection process, and eventually unprocessed segments.
Version
0.16.1-e664cb2
What browser(s) are you using?
Google Chrome 140.0.7339.80
Frigate config file
Relevant Frigate log output
Relevant go2rtc log output
FFprobe output from your camera
Frigate stats
Install method
Docker Compose
docker-compose file or Docker CLI command
Object Detector
Coral
Network connection
Mixed
Camera make and model
Reolink Video Doorbell WiFi, Dahua SD49225T-HN, EmpireTech IPC-B5842E-Z4E, EmpireTech IPC-Color4K-B180
Screenshots of the Frigate UI's System metrics pages
Any other information that may be helpful
Frigate runs in a docker container via docker-compose on a VM in proxmox. The usb coral and gpu are dedicated to the VM and passed to the container. The recording directory passed into the container (/mnt/security_camera:/media/frigate) is a CIFS mount on the VM. I have followed https://docs.frigate.video/troubleshooting/recordings and the debug logs showed copy times were typically around 0.1s with 0.3s at the high end. I never saw anything close to 1s.
Beta Was this translation helpful? Give feedback.
All reactions