[Bug]: 14.0b2 - No Space Left on Device - Cleanup doesnt seem to be running (well) #11974
Replies: 7 comments 13 replies
-
the log is controlled by ffmpeg in this case this looks like |
Beta Was this translation helpful? Give feedback.
-
that only happens when you have sync_recordings enabled. This is extremely CPU intensive and not really worth running every time / enabling by default |
Beta Was this translation helpful? Give feedback.
-
Im curious why its that expensive - its just a dir scan and then a pattern
match on the directory names found.
If we dont do this, then Frigate gradually uses up all space on the device
and runs out of storage space - that doesnt seem like a good outcome.
There's a code flow that is allowing old recordings to not be cleaned up.
…On Sat, Jun 15, 2024 at 10:18 AM 'Nicolas Mowen' via github < ***@***.***> wrote:
On every restart Id expect Frigate to scan everything in its recording
store and cleanup old stuff up.
that only happens when you have sync_recordings enabled. This is extremely
CPU intensive and not really worth running every time / enabling by default
—
Reply to this email directly, view it on GitHub
<#11974 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABRJVJIODSHOCXMSJ6K2653ZHREJXAVCNFSM6AAAAABJLXER5OVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM4TOOBSGA4DK>
.
You are receiving this because you authored the thread.Message ID:
***@***.***
com>
|
Beta Was this translation helpful? Give feedback.
-
Ive got 840MB in there right now.
According to df:
tmpfs 1953128 1037896 915232 54%
/tmp/cache
Im looking on the github container page and see several new images released
within the last hour, but is there a "latest-dev" branch tag or something I
can pull? If not, would it be possible to add such a tag to the latest dev
container? "latest-dev-unstable" or something like that?
…On Sat, Jun 15, 2024 at 10:14 AM 'Nicolas Mowen' via github < ***@***.***> wrote:
/tmp/cache inside of the container.
—
Reply to this email directly, view it on GitHub
<#11974 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABRJVJKI5WCRORKDHCEAIBDZHRD57AVCNFSM6AAAAABJLXER5OVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM4TOOBSGA3TA>
.
You are receiving this because you authored the thread.Message ID:
***@***.***
com>
|
Beta Was this translation helpful? Give feedback.
-
Fair enough - can I provide more info on this since (or how can I get more)
- I've been running into stale recordings for many months now - this is not
a new 0.14 issue. I recall cleaning stuff up from Dec 2023 also a few
months back. Its not a lot of stuff - sometimes an occasional day. Last
night I cleaned up about 5 consecutive days from April, and a late March
directory.
…On Sat, Jun 15, 2024 at 10:24 AM 'Nicolas Mowen' via github < ***@***.***> wrote:
it is not just that, you have to compare with the database to know which
files are missing in the DB as well as what is in the DB but no longer on
the file system.
Also, we have not had wide reports of recordings not being cleaned up or
storage issues, I checked mine and everything is in sync, so it seems to be
an edge case / something that is not fully reproducible.
—
Reply to this email directly, view it on GitHub
<#11974 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABRJVJMB4V6X37VBWMORKCDZHRFADAVCNFSM6AAAAABJLXER5OVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM4TOOBSGEZTM>
.
You are receiving this because you authored the thread.Message ID:
***@***.***
com>
|
Beta Was this translation helpful? Give feedback.
-
I pulled the latest dev- build from about an hour ago and rebuilt/restarted
the container. Still seeing the same black squares on the review page and
missing camera feeds on the home page.
Reloading the browser page results in a blank main frame - left sidebar is
visible.
It eventually came up (partially) after 30s + though.
…On Sat, Jun 15, 2024 at 10:26 AM 'Nicolas Mowen' via github < ***@***.***> wrote:
there was one at one point but it led to too many issues, we are not
looking to have a latest dev tag at this time. beta3 will likely be
released soon so could also just wait for that
—
Reply to this email directly, view it on GitHub
<#11974 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABRJVJOUVBWHEVJMSCX5PJDZHRFITAVCNFSM6AAAAABJLXER5OVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM4TOOBSGE2TA>
.
You are receiving this because you authored the thread.Message ID:
***@***.***
com>
|
Beta Was this translation helpful? Give feedback.
-
I just switched back to 0.14b2 - latest dev seemed worse than b2
docker container stats: (one desktop browser open to home page)
```
CONTAINER ID NAME CPU % MEM USAGE / LIMIT MEM % NET I/O
BLOCK I/O PIDS
99520882c6f5 frigate 245.98% 1.615GiB / 15.61GiB 10.34% 711MB /
15.3MB 315MB / 7.04MB 768
```
```
frigate:
# New ffmpeg borks on hwaccel args when you dont have HW. Older verisons
ignored the settings.
# image: ghcr.io/blakeblackshear/frigate:dev-4e5a6eb
image: ghcr.io/blakeblackshear/frigate:0.14.0-beta2
# image: ghcr.io/blakeblackshear/frigate:0.13.2
container_name: frigate
privileged: true
restart: unless-stopped
environment:
TZ: America/New_York
FRIGATE_RTSP_PASSWORD: "XXXXXXXXX"
shm_size: "1024mb" # update for your cameras based on calculation above
devices:
# - /dev/bus/usb:/dev/bus/usb # passes the USB Coral, needs to be
modified for other versions
- /dev/apex_0:/dev/apex_0 # passes a PCIe Coral, follow driver
instructions here https://coral.ai/docs/m2/get-started/#2a-on-linux
# - /dev/dri/renderD128 # for intel hwaccel, needs to be updated for
your hardware
- /dev/dri/card0 # for intel hwaccel, needs to be updated for your
hardware
volumes:
- /etc/localtime:/etc/localtime:ro
- ./volumes/frigate/config/:/config/
- ./volumes/frigate/storage:/media/frigate
- type: tmpfs # Optional: 1GB of memory, reduces SSD/SD Card wear
target: /tmp/cache
tmpfs:
# Approx 1.8GB
size: 2000000000
ports:
- "5000:5000"
- "1935:1935" # RTMP feeds
```
|
Beta Was this translation helpful? Give feedback.
-
Describe the problem you are having
Im seeing these errors in the logs:
2024-06-15 09:39:50.611503449 [2024-06-15 09:39:50] ffmpeg.outdoor_front.record ERROR : Could not write header for output file #0 (incorrect codec parameters ?): No space left on device
Ok, so I figured that would be an out of disk. However, the storage pool is currently at 45% usage - 2TB free. So there's something odd here.
As an enhancement it would be helpful if that log line above also included the location/path of the directory it encountered the error on.
My "local" drive to the container has 20GB free, the NFS mount has 2TB free so something doesnt make sense here.
It also seems that the periodic cleanup process doesnt seem to be running / running-effectively when storage constraints get tight. It would be a really nice feature if I could set a usage threshold (say 80% to mirror what ZFS storage prefers) where Frigate would kick in the cleanup operation. Even in 0.12/0.13 I had to go in occasionally and manually delete old recordings - it seems some directories would get orphaned and then simply ignored in the subsequent cleanup runs - eg. a few days ago I deleted a handful of recording directories from March and April 2024. Ive got retain recordings set to 7d, and 7d on events (which I changed to 5d last night - reflected in config below). On every restart Id expect Frigate to scan everything in its recording store and cleanup old stuff up.
Fully understand this is beta.
Steps to reproduce
While the new UI in 0.14 is really nice (thanks for that), the general stability of the platform seems significantly lower.
Reviewing the "Review" web page often results in black squares for 10s of seconds on end before anything loads (on my cell phone I couldnt get a page loaded this morning for review). The main page often has "no frames" or white boxes for cameras. The no frames could well be related to this odd no-storage-space issue. This did improve considerably from 0.14b1 to 0.14b2 but Frigate is not as reliable as 0.13 with regards to viewing footage on desktop browser or Android browser (both connecting on local LAN, one wired, one WiFi 5/6).
Version
ghcr.io/blakeblackshear/frigate:0.14.0-beta2 - I cant access this page now because Frigate is unresponsive.
Frigate config file
Relevant log output
Operating system
Other Linux
Install method
Docker Compose
Network connection
Wired
Camera make and model
Axis, Reolink, Amcrest
Any other information that may be helpful
No response
Beta Was this translation helpful? Give feedback.
All reactions