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

Sending many events in a row causes OOM crash #429

Closed
armandsLa opened this issue Jan 25, 2021 · 13 comments
Closed

Sending many events in a row causes OOM crash #429

armandsLa opened this issue Jan 25, 2021 · 13 comments
Labels

Comments

@armandsLa
Copy link

When sending many(100-200) events in a row, SDK ramps up memory usage above 400mb. This eventually causes OOM crash.

@zihejia
Copy link
Contributor

zihejia commented Jan 25, 2021

hi @armandsLa , we will have a look. Could you please share the crash log? Is the crash happened during debugging or in production? If it's possible, could you share a code snippet for how you are sending 200 events in a row?

@zihejia zihejia added the core label Jan 25, 2021
@armandsLa
Copy link
Author

Unfortunately I don't have the crash logs.

This issue occurs in both development and production versions. Events were captured by mistakenly adding on of our endpoints to this function. When user drags an UI element, this function is being called on every position change.

@tokorom
Copy link

tokorom commented Feb 9, 2021

I've seen a similar problem in my app.

If I try to send a lot of events to Mixpanel while offline, the memory of the attached Stack Trace may temporarily stacks more and more. In my hand, I confirmed that this Malloc 2.80 MiB stacks about 600MB.

memory-log

@TimPapler
Copy link

We have actually exactly the same stack when we get crash/app suspended by iOS CPU usage watchdog reports from production.

144 seconds cpu time over 170 seconds (85% cpu average), exceeding limit of 80% cpu over 180 seconds

This is a bit of problem since we can't just limit our users to use app online only. 🙈

@zihejia
Copy link
Contributor

zihejia commented Aug 18, 2021

hi @TimPapler , we have been actively working on this issue for now. Will launch a new release by the end of this month. Sorry for the inconvenience.

@TimPapler
Copy link

hi @TimPapler , we have been actively working on this issue for now. Will launch a new release by the end of this month. Sorry for the inconvenience.

Hey, this is great news, thank you.

@jaredmixpanel
Copy link
Contributor

@armandsLa @tokorom @TimPapler We have a new beta release that addresses this issue if you'd like to try it out here: https://github.com/mixpanel/mixpanel-swift/releases/tag/v3.0.0.beta.4 (Please note though the beta release does not include Messages & Experiments functionality)

@jaredmixpanel
Copy link
Contributor

Instructions for installing the beta branch are here: https://github.com/mixpanel/mixpanel-swift/tree/3.0.0.beta#installation

@TimPapler
Copy link

@armandsLa @tokorom @TimPapler We have a new beta release that addresses this issue if you'd like to try it out here: https://github.com/mixpanel/mixpanel-swift/releases/tag/v3.0.0.beta.4 (Please note though the beta release does not include Messages & Experiments functionality)

At the moment we still depend on Messages functionality so I am not sure if I can test it right now. Will this issue be resolved in pre 3.0+ Mixpanel frameworks or is it 3.0+ only? I know we will have to migrate Messages functionality to 3rd party partner before the end of the year but still.

@jaredmixpanel
Copy link
Contributor

@TimPapler the switch to SQLite will be 3.0+ only

@TimPapler
Copy link

@TimPapler the switch to SQLite will be 3.0+ only

I see, ok will have to migrate sooner then. When is 3.0 expected to be out of beta?

@jaredmixpanel
Copy link
Contributor

@TimPapler The intention is to keep the version without Messages & Experiments as "beta" until M&E is fully deprecated. We will move it out of beta after we get some feedback, but that won't be before we have deprecated M&E in January 2022.

@zihejia
Copy link
Contributor

zihejia commented Dec 13, 2021

Marking it closed now. Since 3.0.0 release is just around the corner(Jan 1, 2022) and we are encouraging everyone to try it out. We are fully supporting it!

Reminder: On Jan 1, 2022, Messages & Experiments will be removed from Mixapnel.

@zihejia zihejia closed this as completed Dec 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants