Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Limited shm frame count #12346

Merged
merged 8 commits into from
Jul 9, 2024
Merged

Limited shm frame count #12346

merged 8 commits into from
Jul 9, 2024

Conversation

NickM-27
Copy link
Collaborator

@NickM-27 NickM-27 commented Jul 8, 2024

This is a simpler approach to #12020 which has the capture process clean up SHM frames automatically to ensure the SHM will not overflow.

Copy link

netlify bot commented Jul 8, 2024

Deploy Preview for frigate-docs canceled.

Name Link
🔨 Latest commit 2dbec29
🔍 Latest deploy log https://app.netlify.com/sites/frigate-docs/deploys/668d2f1ba9ecd10008c60b39

frigate/object_processing.py Outdated Show resolved Hide resolved
frigate/object_processing.py Outdated Show resolved Hide resolved
@NickM-27 NickM-27 merged commit 34812b7 into dev Jul 9, 2024
13 checks passed
@NickM-27 NickM-27 deleted the limited_shm branch July 9, 2024 12:44
@YBonline
Copy link

YBonline commented Jul 9, 2024

This causes my SHM to run out immediately on startup, no errors in the logs except no space available, reverting to previous build fixes issue

@NickM-27
Copy link
Collaborator Author

NickM-27 commented Jul 9, 2024

how much SHM do you have available and what are the detect fps?

@YBonline
Copy link

YBonline commented Jul 9, 2024

shm_size: "1521mb"
5 fps

Honestly, thinking about it I might need to recalculate based off the guide of what it should be, I might have added cameras since then, but I've had 0 zero issues before this.
I seem to recall in the past if the shm size was too low, there would be a message in log with a recommended value, I don't seem to see that, is my memory right?

@NickM-27
Copy link
Collaborator Author

NickM-27 commented Jul 9, 2024

there is but technically we did not update that calculation for this, not 100% sure if things changed. I am also seeing issues but not like you are describing, it is just having a lot of missed frames

hawkeye217 added a commit that referenced this pull request Jul 9, 2024
NickM-27 added a commit that referenced this pull request Jul 9, 2024
hawkeye217 pushed a commit that referenced this pull request Jul 9, 2024
NickM-27 added a commit that referenced this pull request Jul 9, 2024
* Only keep 2x detect fps frames in SHM

* Don't delete previous shm frames in output

* Catch case where images do not exist

* Ensure files are closed

* Clear out all frames when shutting down

* Correct the number of frames saved

* Simplify empty shm error handling

* Improve frame safety
NickM-27 added a commit that referenced this pull request Sep 2, 2024
* Only keep 2x detect fps frames in SHM

* Don't delete previous shm frames in output

* Catch case where images do not exist

* Ensure files are closed

* Clear out all frames when shutting down

* Correct the number of frames saved

* Simplify empty shm error handling

* Improve frame safety
NickM-27 added a commit that referenced this pull request Sep 3, 2024
* Only keep 2x detect fps frames in SHM

* Don't delete previous shm frames in output

* Catch case where images do not exist

* Ensure files are closed

* Clear out all frames when shutting down

* Correct the number of frames saved

* Simplify empty shm error handling

* Improve frame safety
NickM-27 added a commit that referenced this pull request Sep 3, 2024
* Only keep 2x detect fps frames in SHM

* Don't delete previous shm frames in output

* Catch case where images do not exist

* Ensure files are closed

* Clear out all frames when shutting down

* Correct the number of frames saved

* Simplify empty shm error handling

* Improve frame safety
NickM-27 added a commit that referenced this pull request Sep 3, 2024
* Limited shm frame count (#12346)

* Only keep 2x detect fps frames in SHM

* Don't delete previous shm frames in output

* Catch case where images do not exist

* Ensure files are closed

* Clear out all frames when shutting down

* Correct the number of frames saved

* Simplify empty shm error handling

* Improve frame safety

* Add handler logs when frame is None

* Don't fail on cleanup

* Cleanup logging

* Update docs

* Update calculation

* Restore condition

* Fix case where thumbnail is saved without frame

* Adjust debug logs

* Calculate best shm frame count

* Fix shm count calculation

* Catch missing frame

* Formatting

* Clarify docs

* Catch none frame in autotracking
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants