chuck icon indicating copy to clipboard operation
chuck copied to clipboard

OutOfMemory Exception when request/response body has huge data(like a video for example)

Open droidluv opened this issue 7 years ago • 2 comments

Large body data should be ignored and a simple string should be given instead

droidluv avatar Nov 17 '17 11:11 droidluv

Got the same issue. Here's the stacktrace:

E/FATAL EXCEPTION: Happened on thread: Thread[OkHttp Dispatcher,5,main]
                                                                              java.lang.OutOfMemoryError: Failed to allocate a 8208 byte allocation with 1416 free bytes and 1416B until OOM, max allowed footprint 201326592, growth limit 201326592
                                                                                  at okio.Segment.<init>(Segment.java:63)
                                                                                  at okio.SegmentPool.take(SegmentPool.java:48)
                                                                                  at okio.Buffer.writableSegment(Buffer.java:1169)
                                                                                  at okio.Okio$2.read(Okio.java:137)
                                                                                  at okio.Buffer.writeAll(Buffer.java:1005)
                                                                                  at okhttp3.RequestBody$3.writeTo(RequestBody.java:120)
                                                                                  at com.readystatesoftware.chuck.ChuckInterceptor.intercept(ChuckInterceptor.java:154)
                                                                                  at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
                                                                                  at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121)
                                                                                  at okhttp3.logging.HttpLoggingInterceptor.intercept(HttpLoggingInterceptor.java:212)
                                                                                  at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
                                                                                  at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121)
                                                                                  at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:200)
                                                                                  at okhttp3.RealCall$AsyncCall.execute(RealCall.java:147)
                                                                                  at okhttp3.internal.NamedRunnable.run(NamedRunnable.java:32)
                                                                                  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
                                                                                  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
                                                                                  at java.lang.Thread.run(Thread.java:764)

LouisCAD avatar Dec 16 '17 15:12 LouisCAD

me to

liudao01 avatar Apr 08 '18 08:04 liudao01