Repository navigation
[Help] Ramdisk filled up and recording crashed with 129 cameras #118
Fregata version0.18.2 macOS version and chipmacOS 26.4.1 Mac Studio M3 Ultra 96 GB Diagnostic bundle IDFDB-QN1H6A3WA42V9CCSS6BJ What are you trying to do?Fregata was running with the smart memory setting, and somehow the ramdisk filled up or ran out of space and crashed. Unable to see footage after that time. What have you tried?No response Relevant logs (only if you couldn't attach a diagnostic bundle)No response Camera setup (if relevant)No response |
Replies: 3 comments 21 replies
|
Hey @marcosmejias 129 cameras has got to be a record! That's simply amazing. The RAM disk didn’t run out of space, it ran out of file slots. On your Mac, Smart memory has room for 48 GB, but it also has a fixed limit of 256,000 files. Just before noon it held 246,739 files while using only 8 GB. Almost all of them were the small preview images behind the History timeline. Even on your MASSIVE install, the 256,000 file limit should not have been hit and was only hit because of a bug in the file cleanup code that we are working on fixing right now. I'll have a build for you as soon as it's ready that will solve this issue and it will be included in the next release. To get back up and running:
Separately, the bundle shows your Mac is overloaded. All 129 cameras are being processed at about 1.5 frames per second instead of the 5 you set, and the CPU is fully busy. That weakens detection and causes occasional decode errors and camera restarts. Detection currently decodes each camera’s 1080p main stream. We generally don't recommend using detection substreams with Fregata, because Macs can easily handle 10, 20, 30+ cameras without them. But in your case, with 129 cameras, using detection substreams on at least some of them would drastically lower your Mac's CPU usage. |
|
Thanks @marcosmejias Frigate allows up to 60 seconds of clips per camera to be in the RAM disk waiting to be moved to the media directory. If more than 60 seconds of clips for a single camera back up in the RAM disk, Frigate starts discarding older clips so that it can catch up. This is what you're seeing in the logs. This works well for normally-sized installs, but on yours with 129 cameras it's getting backed up. For you, this happens most often near the start of an hour when every camera creates a new clip simultaneously. 129 cameras produces a lot of clips to move. What we changed in the below build:
There are 2 things we are looking for here:
The next diagnostic bundle should answer both of these questions with our enhanced logging. Please run the below build for 24-48 hours and then send a new diagnostic bundle. Or if things are worse or you hit anything unexpected, send us a diagnostic bundle immediately. https://releases.fregata.app/beta/Fregata-BETA-v0-18-2-1-recording-mover-diag-bed5a1c1a.dmg |
|
@marcosmejias thanks for the bundle and the new info. The bundle confirms that all the previously reported issues are fixed, but we still have work to do while running Fregata at the scale you are running at. These are harmless, all the requests complete, but just not within 5s due to the 129 cameras firing these at once. We've now staggered the checks so that these warnings are far less likely to hit. We've made multiple fixes that should help with the jumps you see and fix other issues we found in the bundle. https://releases.fregata.app/beta/Fregata-BETA-scale-fix-15f65ea4c.dmg Please continue to submit bundles and let us know about any issues you see. We want to fix every single one of them that we can. 129 cameras is by far the largest Fregata installation, but every issue we fix improves Fregata not only for you, but for every other user in the future that wants to run Fregata at such a massive scale. |
@marcosmejias thanks for the bundle and the new info. The bundle confirms that all the previously reported issues are fixed, but we still have work to do while running Fregata at the scale you are running at.
These are harmless, all the requests complete, but just not within 5s due to the 129 camera…