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

OOM when using media tracker on a low spec device #680

Open
fpitterstv2 opened this issue Mar 15, 2024 · 4 comments
Open

OOM when using media tracker on a low spec device #680

fpitterstv2 opened this issue Mar 15, 2024 · 4 comments
Assignees
Labels
type:defect Bugs or weaknesses. The issue has to contain steps to reproduce.

Comments

@fpitterstv2
Copy link

Describe the bug
We are getting OOM reports after playing for very long >6 hours on device model that is ~
The stacktrace is as follow

 Fatal Exception: java.lang.OutOfMemoryError
Failed to allocate a 33554444 byte allocation with 4194152 free bytes and 28MB until OOM
java.util.HashMap.resize (HashMap.java:511)
java.util.HashSet.add (HashSet.java:217)
com.snowplowanalytics.core.media.controller.MediaSessionTrackingStats.updateDurationStats (MediaSessionTrackingStats.java:106) 

To Reproduce
Enable media tracking updating position every second and play some content for several hours

Device informatoin (please complete the following information):
Mostly seeing on a STB with 1GB of RAM running Android 7, but it's showing up on other devices more sporadically

**Other
The set (HashSet) is trying to allocate ~35MB of memory, that doesn't feel like much, but it's probably holding another array of ~30MB for the copy.
We are wondering if we can come up with a different approach to account for the played seconds instead of using a ever growing set?

@fpitterstv2 fpitterstv2 added the type:defect Bugs or weaknesses. The issue has to contain steps to reproduce. label Mar 15, 2024
@mscwilson
Copy link
Contributor

Hi! What version of the tracker is this?

@fpitterstv2
Copy link
Author

Thanks for following up, we are using 6.0.1

@fpitterstv2
Copy link
Author

We are wondering if there is any chance for this issue to be reviewed?

@mscwilson
Copy link
Contributor

Hi, sorry for not getting back to you earlier. As it stands, it doesn't look like we'll be able to address this issue this quarter, sorry.

If you are a Snowplow customer, consider raising a Support ticket and mention this Issue - that would help us prioritise it in our roadmap.

Alternatively, PRs are very welcome!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:defect Bugs or weaknesses. The issue has to contain steps to reproduce.
Projects
None yet
Development

No branches or pull requests

3 participants