You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to download a .tgz archive of 50mb, and I am getting OOM on Samsung Galaxy Tab 2. But the file downloads without any issues on more recent devices and also on the simulator.
Seems that the default buffer size is larger than the available free memory on older devices.
Is there a way to specify the buffer size ?
07-02 17:25:27.250 4725-4725 I/DataFetcher: Retry count : 1
07-02 17:25:28.257 4725-5216 D/dalvikvm: GC_FOR_ALLOC freed 48K, 23% free 8349K/10820K, paused 27ms, total 28ms
07-02 17:25:28.257 4725-5216 I/dalvikvm-heap: Forcing collection of SoftReferences for 41758031-byte allocation
07-02 17:25:28.289 4725-5216 D/dalvikvm: GC_BEFORE_OOM freed 0K, 23% free 8349K/10820K, paused 33ms, total 33ms
07-02 17:25:28.289 4725-5216 E/dalvikvm-heap: Out of memory on a 41758031-byte allocation.
07-02 17:25:28.289 4725-5216 I/dalvikvm: "pool-2-thread-1" prio=5 tid=13 RUNNABLE
07-02 17:25:28.296 4725-5216 I/dalvikvm: | group="main" sCount=0 dsCount=0 obj=0x4284df50 self=0x5a21da30
07-02 17:25:28.296 4725-5216 I/dalvikvm: | sysTid=5216 nice=0 sched=0/0 cgrp=apps handle=1512164168
07-02 17:25:28.296 4725-5216 I/dalvikvm: | state=R schedstat=( 157897947 44738772 373 ) utm=14 stm=0 core=0
07-02 17:25:28.296 4725-5216 I/dalvikvm: at cz.msebera.android.httpclient.util.ByteArrayBuffer.<init>(ByteArrayBuffer.java:~56)
07-02 17:25:28.296 4725-5216 I/dalvikvm: at com.loopj.android.http.AsyncHttpResponseHandler.getResponseData(AsyncHttpResponseHandler.java:472)
07-02 17:25:28.296 4725-5216 I/dalvikvm: at com.loopj.android.http.AsyncHttpResponseHandler.sendResponseMessage(AsyncHttpResponseHandler.java:442)
07-02 17:25:28.296 4725-5216 I/dalvikvm: at com.loopj.android.http.AsyncHttpRequest.makeRequest(AsyncHttpRequest.java:160)
07-02 17:25:28.296 4725-5216 I/dalvikvm: at com.loopj.android.http.AsyncHttpRequest.makeRequestWithRetries(AsyncHttpRequest.java:177)
07-02 17:25:28.296 4725-5216 I/dalvikvm: at com.loopj.android.http.AsyncHttpRequest.run(AsyncHttpRequest.java:106)
07-02 17:25:28.296 4725-5216 I/dalvikvm: at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:390)
07-02 17:25:28.296 4725-5216 I/dalvikvm: at java.util.concurrent.FutureTask.run(FutureTask.java:234)
07-02 17:25:28.296 4725-5216 I/dalvikvm: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)
07-02 17:25:28.296 4725-5216 I/dalvikvm: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)
07-02 17:25:28.296 4725-5216 I/dalvikvm: at java.lang.Thread.run(Thread.java:856)
07-02 17:25:28.335 4725-5216 E/dalvikvm: adjustAdaptiveCoef max=4194304, min=1048576, ut=568
07-02 17:25:28.335 4725-5216 D/dalvikvm: GC_EXPLICIT freed <1K, 23% free 8349K/10820K, paused 2ms+3ms, total 34ms
The text was updated successfully, but these errors were encountered:
I'm sorry, but default AsyncHttpResponseHandler is not meant to handle such large data. Use FileAsyncHttpResponseHandler.java or provide your own ResponseHandler, that would stream the file directly to filesystem, instead of caching it in memory and writing it out later
I am trying to download a .tgz archive of 50mb, and I am getting OOM on Samsung Galaxy Tab 2. But the file downloads without any issues on more recent devices and also on the simulator.
Seems that the default buffer size is larger than the available free memory on older devices.
Is there a way to specify the buffer size ?
The text was updated successfully, but these errors were encountered: