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

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

Open
droidluv opened this issue Nov 17, 2017 · 2 comments

Comments

@droidluv
Copy link

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

@LouisCAD
Copy link

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)

@liudao01
Copy link

liudao01 commented Apr 8, 2018

me to

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

3 participants