-
Notifications
You must be signed in to change notification settings - Fork 2
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
Pendo iOS SDK API timeouts cause unbounded memory growth #174
Comments
Hi @johntmcintosh, Your case is slightly different as the SDK detects available connectivity BUT when it tries to connect it get blocked by the host app. The error log is kinda explains it:
The issue occurs here
We will try to release a fix that will handle the case of status code 0 |
Hi Mike, thanks for the detailed response. I don't think we have had any issues with "normal" offline support for our other customers, but I believe our sub id is |
@johntmcintosh |
We are seeing similar reports in our product, and it looks to be occurring for some users who are seeing 2-4 minute (yes minute) response times from pendo requests. The application deadlocks and then memory climbs until springboard kills the process. |
@sigsbeym @johntmcintosh |
@MikePendo It looks like there is a fix in 3.4.0 for a memory pressure issue, so I'm going to try upgrading to that today to see if this fixes the issue we are facing. |
Update: upgrading to 3.4.0 did not resolve the issue for our affected users. |
@johntmcintosh |
Platform + Version
iOS 17
SDK Version
3.3.1
Framework
Native iOS, mostly UIKit with some SwiftUI
Describe the bug
We observed a scenario that results in unbounded memory growth from the Pendo SDK when Pendo API calls timeout.
This problem initially manifest to us through reports of app terminations due to high memory usage. Here's a plot showing memory usage by the app over the course of an hour with and without Pendo's API calls timing out.
When the API calls timed out 100% of the time, we would see the app's memory growth climb from our typical 100 MB to 1.6 GB and then be terminated by the OS.
Our app is primarily used in restricted network environments. Although we are aware of the guidance on which hostnames should be allowed, one of our customers did not have Pendo hosts allowed, resulting in all API calls to Pendo being routed to the customer's internal network rather than to your API. These calls would eventually fail with timeouts.
In my testing, after launching the app with Pendo's API blocked by a proxy, starting a session, and triggering a few events, I observe Pendo getting stuck in an infinite attempt to get an access token. pendo-logs.txt has a snapshot of the logs that we see repeating every approx 30 seconds once this loop begins.
Our customers use the app continuously for 1-2 hours at a time, and during that time a significant number of screen change events are generated. My light investigation suggests that over time as more and more events are generated, each one in starting up more and more attempts to get an access token, and each attempt continues looping. Over time this eventually results in the memory growth shown in the graph above.
For our customers
To Reproduce
Steps to reproduce the behavior:
data.pendo.io
with 100% packet loss.PendoManager.shared.setDebugMode(true)
pendoManager.startSession(...)
with a user's detailsscreenContentChanged()
as screens change.Expected behavior
We expect the SDK to be more resilient to failing network conditions and gracefully handle 100% packet loss without resulting in unbounded memory growth.
Logs
pendo-logs.txt
Sample Code
n/a
The text was updated successfully, but these errors were encountered: