[Support]: Out of memory: Killed process (frigate.capture) #16710
Replies: 10 comments 2 replies
-
Sounds similar to my long-standing issue with wireless Hikvision cameras - #10814 - though I was able to reproduce it simply by disconnecting the ethernet cable on a wired camera too. 9 times out of 10 connection loss for a camera is harmless, but 1 in 10 times it causes something to crap out. Wifi cameras I suspect are just more prone to triggering. |
Beta Was this translation helpful? Give feedback.
-
I'm having oom-killer events as well. Running a simple installation, no gen ia with 3 wired cameras on a 6 GB Proxmox LXC. I'm having these issues most of the time when using the web interface , especially the video and object life cycle in the explore section are prone to do this. |
Beta Was this translation helpful? Give feedback.
-
It's becoming more and more of a problem to the point where I may have to drop Frigate entirely. |
Beta Was this translation helpful? Give feedback.
-
I have the same problem with my Amcrest WIFI doorbell camera. Hangs with the graceful exit message. I am running both my cameras through Go2RTC and downsampling the higher-bitrate stream to 1280x960 for my detect stream (the substream is only 720x576 and doesn't give great detect results.) I have no idea what is happening and don't even really know where to look - but I've just solved my problem by watching for either of my camera feeds to die in either Frigate or Go2RTC with the following script. If it dies I'm using a go2rtc API call to restart Go2RTC (only). This has caused a Go2RTC restart to occur about 5 times a day over the last 4 days. I lose about 8 seconds of recording during that restart but that is much shorter than restarting the whole FRIGATE process. Thus far it has worked like a champ. No more "dead camera" in my otherwise working Frigate instance. Frigate is running inside an privileged Proxmox LXC container (because I'm lazy and couldn't get the Coral card passthru to work inside the LXC correctly.) The host system is an old laptop and has Plex, Immich and Frigate running on it and all are using Intel GPU (shared) for video processing. It is probably not enough resources but it works for me. Anyway - I run this shell script inside the container with root permissions and have it set up as a systemd cron job that runs ever 10 seconds and looks for the camera to be missing. If it is then it issues the API call and sends a notification to Home Assistant. I'm not sure if the sleep/wait thing is really required but I didn't want systemd to launch another watch instance while Go2RTC was restarting - so I just have it wait. This seems to kill the cron process so then I restart the cron process with the last two lines. Super kludge and I don't really know how to code. ChatGPT wrote the "jq" steps for me. But they work... #!/bin/sh
GO2RTC_URL="http://192.168.xxx.yyy:1984/api/streams"
FRIGATE_URL="http://192.168.xxx.yyy:5000/api/stats"
FRIGATE_CAMERAS_DOWN=$(curl -s $FRIGATE_URL | jq -r '.cameras | to_entries[] | select(.value.camera_fps == 0.0) | .key')
GORTC_CAMERAS_DOWN=$(curl -s $GO2RTC_URL | jq -r 'to_entries[] | select(.value.producers == null or .value.producers == []) | select(.key | test("rest_command|other_non_camera_items") | not) | .key')
switch=0
# Check if any FRIGATE cameras are down
if [ -n "$FRIGATE_CAMERAS_DOWN" ]; then
echo "Camera(s) down: $FRIGATE_CAMERAS_DOWN"
switch=$((switch+1))
fi
# Check if any GO2RTC cameras are down
if [ -n "$GO2RTC_CAMERAS_DOWN" ]; then
echo "Camera(s) down: $GO2RTC_CAMERAS_DOWN"
switch=$((switch+1))
fi
if [ "$switch" -gt 0 ];
then
switch=$((0))
echo "Restarting Go2RTC"
curl -X POST http://192.168.xxx.yyy:1984/api/restart
curl -X POST http://192.168.xxx.zzz:8123/api/services/notify/mobile_app_<myphoneid> -H "Authorization: Bearer <TokenfromHA>" -H "Content-Type: application/json" -d '{"message": "A camera stream may be down - Go2RTC has restarted!", "title": "Frigate Alert"}'
sleep 300 &
wait
systemctl enable --now frigate-check.timer
systemctl restart frigate-check.timer
fi then inside the Frigate Config file under my Go2RTC config I added:
No original work here - flagrantly plagiarized from other people's work - just sharing what I have working. Didn't include the steps to get the systemd cron process running - ask the goog or ai. |
Beta Was this translation helpful? Give feedback.
-
I have only been running Frigate for 5 days and this has happen to me 2 times already. I have a single TP-Link C320WS connected by Ethernet and every time the network goes down, for whatever reason, I get an And there is also the memory issue, last time it consumed over 10GB of RAM before the OOM came to kill Here is the system log for the last time it happen:
Note: Yes, I'm aware that running a docker container in a privileged LXC is far from ideal, but it was the "fastest" way to get it working (for now) and I don't think it is related wit the issue. |
Beta Was this translation helpful? Give feedback.
-
Same:
|
Beta Was this translation helpful? Give feedback.
-
@NickM-27 for me and probably other user it's critical issue. It's ok when it affects only itself like restarting container but not whole system. I migrated from QNAP to UnRAID which much better specs -switched from i965 to iHD (J4125 -> i5-12500) but still it's unstable. |
Beta Was this translation helpful? Give feedback.
-
Been experiencing random freezes on an UnRAID server that could only be recovered from a force shutdown the past couple of months as a result of this. Recently discovered it was caused by Frigate and limited its container memory to 2GB though it still manages to cause a full server freeze every few weeks. Frigate is unfortunately unusable with this issue present. Log Dump
|
Beta Was this translation helpful? Give feedback.
-
I have also been suffering from the same problem for several months now. Since I run several Docker containers, including Frigate, I started measuring the memory usage and the problem clearly comes from Frigate: Since I have been unable to fix the problem and my entire server kept crashing, bringing down Home Assistant, Z2M... I finally set up a Home Assistant automation which restarts the Frigate service every time it hits So again, not a solution to the problem, but my system does not crash anymore... |
Beta Was this translation helpful? Give feedback.
-
Was having the same problem with lockups and memory usage, so added this to the "Extra Parameters" for the Docker containers settings in Unraid. It still consumes memory but stops my Unraid locking up when it is exhausted. Not a fix but a workaround until I can track down the cause. |
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
My UnRAID server has been crashing lately. The logs during the crash show the issue to be with Frigate. See the below logs.
This has happened across multiple versions of Frigate. I thought it may be a 0.15beta issue so reverted back to 0.14 and the issue persisted.
I have tried capping the memory of the container to 4G (seen commented in compose) but that didn't seem to make a difference either.
I'm yet to find a pattern to the issue, it is seemingly random.
Unfortunately getting any Frigate logs is proving difficult as the whole system is generally unresponsive until it is rebooted.
I understand ReoLink cameras can sometimes be problematic but as this is a restream of a Scrypted broadcast (used for the HomeAssistant integration) I'm not sure that would be a problem here.
Any help is appreciated.
Regards,
Jack
Version
0.15.0-cea210d
What browser(s) are you using?
No response
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
TensorRT
Network connection
Wired
Camera make and model
ReoLink DB_566128M5MP_W
Screenshots of the Frigate UI's System metrics pages
Any other information that may be helpful
No response
Beta Was this translation helpful? Give feedback.
All reactions