Closed jasonpstokes closed 2 years ago
Can you post your compose file?
services:
frigate:
container_name: frigate
image: blakeblackshear/frigate:0.10.0-beta6-amd64
hostname: frigate
restart: always
devices:
- /dev/dri/renderD128:/dev/dri/renderD128
- /dev/bus/usb:/dev/bus/usb
volumes:
- /etc/localtime:/etc/localtime:ro
- /usr/docker/frigate10/config.yml:/config/config.yml:ro
- /usr/docker/frigate10/labelmap.txt:/labelmap.txt:ro
- /usr/docker/frigate10/database:/media/frigate/database
- /mnt/nas/frigate10:/media/frigate
- type: tmpfs
target: /tmp/cache
tmpfs:
size: '1gb'
network_mode: bridge
ports:
- 5000:5000
environment:
FRIGATE_MQTT_PASSWORD: ""
FRIGATE_USER: ""
FRIGATE_PASSWORD: ""
LIBVA_DRIVER_NAME: "radeonsi"
There are tons of segmentation faults in your logs, but I don't think that's related to the recordings being deleted. I would recommend setting a shm_size in your compose file to see if that resolves the frequent segmentation faults.
I assume you started seeing the Unable to find file from recordings database
messages in the logs after the files were deleted. If so, this means the recording entries still exist in the database. There are 2 places where frigate deletes files from the recordings directory and both of them remove the database entry at the same time. This indicates that the files were deleted external to frigate.
There is one other location that cleans up old recordings that do not have a database entry, but it only deletes files older than the last entry in the database, so I don't see how this could have happened there either.
Unfortunately, I don't see any answer as to why this happened. You may want to turn on debug output for the record process to get more info for what the cleanup jobs are doing in case it happens again.
logger:
default: info
logs:
frigate.record: debug
Thanks for looking into this, and your response - appreciated!
No idea what might have deleted those recordings outside of Frigate, and it wasn't a NAS mount issue. They're just gone! Oh well, I'll see if it happens again and what else might be going on.
I've added shm_size: '256m'
to my compose file and restarted, however the SHM size required is a little confusing. The docs say 64m is fine for 2 cameras, so I'd assume I need approx. 4x more with 6 cameras, but using the provided formula: (width * height * 1.5 * 9 + 270480)/1048576
I get:
(896 * 672 * 1.5 * 9 + 270480)/1048576 = 8.00990295410156
6 cameras * 8.00990295410156 = 48m ...well below 64m! Have I got that wrong, or should there be an extra zero somehow?
PS Updated website looks great!
EDIT: updated for the revised calculation
In 24 hours I've had a cache full error and 7 seg faults - is it something with my host or docker setup, or something in Frigate? (Plain Debian 11 with Docker, all up to date.)
This is after deleting the database and recording folder yesterday, to start from scratch after further issues. Full log since attached.
I also increased the shm size to 320m when I cleared the database yesterday.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Wanted to check in on this and point out that beta 8 is now available. I don't think anything specifically would have addressed any of this, but wasn't sure if you were still having these issues.
Yesterday I set up Docker on a desktop to test and Frigate has run without issue since. Mixed feelings about this!! It's good that Frigate is running well now (not Frigate's fault) but sadly it points to my homelab server having issues.
Can you please confirm the shm formula though? If my calculations above are right I only need 48mb...which doesn't seem right! (I'm running 320m)
Love the development. Any chance a UI update (esp. for mobile) will make the roadmap soon? :-)
Your calculation looks right to me. That should be enough shm storage unless something is not getting cleaned up properly.
There are some UI updates brewing from a few users. I have some major backend updates planned for the next version, but I definitely have my eye on some UI improvements after that.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Describe the problem you are having
Over the last few days Frigate 0.10 beta has crashed and needed restarting a couple times. Today though when it failed it erased my entire recordings folder!? Screenshots are still there.
(this is from inside the Frigate container)
Full log dump below. If there is anything else I can give please let me know?
Version
0.10.0-DB1255A
Frigate config file
Relevant log output
FFprobe output from your camera
Frigate stats
Operating system
Debian
Install method
Docker Compose
Coral version
USB
Network connection
Wired
Camera make and model
Reolink RLC-520A
Any other information that may be helpful
_frigate_logs.txt