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

AWS Mobile Analytics: Out of memory error #178

Closed
bdipak opened this issue Jul 22, 2016 · 2 comments
Closed

AWS Mobile Analytics: Out of memory error #178

bdipak opened this issue Jul 22, 2016 · 2 comments

Comments

@bdipak
Copy link

bdipak commented Jul 22, 2016

Please find the below stack trace. I don't have any particular step to reproduce this.It is reported only once. And our app user has reported it via playstore.
SDK: 'com.amazonaws:aws-android-sdk-mobileanalytics:2.2.12'

I don't think it would be possible to debug this issue with the limited information provided but I feel it would be helpful if aws sdk consume this error.

java.lang.OutOfMemoryError
at java.lang.String.(String.java:422)
at java.lang.AbstractStringBuilder.toString(AbstractStringBuilder.java:642)
at java.lang.StringBuilder.toString(StringBuilder.java:663)
at org.json.JSONStringer.toString(JSONStringer.java:430)
at org.json.JSONArray.toString(JSONArray.java:575)
at com.amazonaws.mobileconnectors.amazonmobileanalytics.internal.delivery.ERSRequestBuilder.createRecordEventsRequest(ERSRequestBuilder.java)
at com.amazonaws.mobileconnectors.amazonmobileanalytics.internal.delivery.DefaultDeliveryClient.submitEvents(DefaultDeliveryClient.java)
at com.amazonaws.mobileconnectors.amazonmobileanalytics.internal.delivery.DefaultDeliveryClient$3.run(DefaultDeliveryClient.java)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:841)

@wdane
Copy link
Contributor

wdane commented Jul 25, 2016

It looks like when the events are being read from storage to be sent it is causing the phone to run out of memory. The default max size of events per individual request is relatively small, only 102400 characters (so if they are all ASCII characters, then 102kB). Are you using any options to increase this length? It's possible there is a bug causing a memory leak during submission. Do you know the approximate size of the records you are sometimes sending? Are you sending GB's of events?

@wdane
Copy link
Contributor

wdane commented Sep 8, 2016

Closing, feel free to re-open if this is still happening.

@wdane wdane closed this as completed Sep 8, 2016
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