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

MSIDLastRequestTelemetry perfTelemetry grows unbounded #1472

Open
martinregnerlarsen opened this issue Jan 27, 2025 · 1 comment
Open

MSIDLastRequestTelemetry perfTelemetry grows unbounded #1472

martinregnerlarsen opened this issue Jan 27, 2025 · 1 comment
Assignees

Comments

@martinregnerlarsen
Copy link

In some circumstances perfTelemetry seems to grow unbounded ending up causing apps being shut down on iOS due to excessive memory usage.

We have a bunch of iPhones running an app written in React Native using MSAL for Objective-C to authenticate. The phones are running in shared device mode, which may be of importance.

What we see is that over a time span of a couple of weeks the most used phones starting to be sluggish, getting MemoryWarnings from iOS and ultimately getting shut down due to excessive memory usage. When that started it got worse and worse until memory usage crashes happened after few minutes of using the app.

Restart of the app didn't work, but a complete reset of the phone brought it back, where we had some weeks of good behavior until the crashing started again.

During investigation we could see that the perfTelemetry in MSIDLastRequestTelemetry seems to grow unbounded on these phones, in the case we looked at storing more than 80.000 records for silent token fetching.

Image

These records are stored to disk and persisted over app restarts and seems to be also cloned (probably due to thread safety) multiple times, causing the app memory usage to spike over 2 GB.

I don't know why this happens. I couldn't actually find out when the perfTelemetry is supposed to be cleared, but I guess it doesn't always happen otherwise people would clearly notice.

Right now we workaround this by deleting the msal.telemetry.lastRequest file before initializing MSAL, as I coulnd't find any way to disable the telemetry collection.

@juan-arias juan-arias self-assigned this Jan 30, 2025
@juan-arias
Copy link
Member

Thank you for reporting this @martinregnerlarsen
We are working to fix this.

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

No branches or pull requests

2 participants