-
Notifications
You must be signed in to change notification settings - Fork 549
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
Fatal Exception: java.lang.OutOfMemoryError #3616
Comments
Hi @ranjeet-porter, can you provide us with some more details around how to reproduce this with some code snippets, call pattern, and set up? Out of memory exception could be caused by different processes, were you able to profile your app during the crash to identify what's using up the memory? |
Hi @lawmicha
Device Specification:
|
could you share the code snippets for this?
|
|
I'm a bit confused by
What values have you set for Are you setting both of those values to 0? |
I set minTimeout = 4 and maxTimeout = 15 but with maxAttempt is -1 and I got out of memory exception |
@ranjeet-porter It would be helpful if you were able to add logs of a connect attempt session. I believe you can enable in the SDK by simply calling Also curious if you have tried a high (but not infinite value). Ex: maxAttempt = 100. I'm curious if you still see the same behavior. In a quick glance at the code, the exponential backoff should prevent too many attempts, but to receive OOM exceptions seems to indicate that reconnects are rapidly being attempted. |
Fatal Exception: java.lang.OutOfMemoryError: pthread_create (1040KB stack) failed: Try again
at java.lang.Thread.nativeCreate(Thread.java)
at java.lang.Thread.start(Thread.java:733)
at com.amazonaws.mobileconnectors.iot.AWSIotMqttManager.scheduleReconnect(AWSIotMqttManager.java:1377)
at com.amazonaws.mobileconnectors.iot.AWSIotMqttManager.handleConnectionFailure(AWSIotMqttManager.java:1356)
at com.amazonaws.mobileconnectors.iot.AWSIotMqttManager.reconnectWithIAM(AWSIotMqttManager.java:1346)
at com.amazonaws.mobileconnectors.iot.AWSIotMqttManager.reconnectToSession(AWSIotMqttManager.java:1278)
at com.amazonaws.mobileconnectors.iot.AWSIotMqttManager$4.run(AWSIotMqttManager.java:1385)
at android.os.Handler.handleCallback(Handler.java:873)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:201)
at android.os.HandlerThread.run(HandlerThread.java:65)
SDK Version : com.amazonaws:aws-android-sdk-iot: 2.16.12
Platform : Android
The text was updated successfully, but these errors were encountered: