woshidan's loose leaf

ぼんやり勉強しています。

Retrofitがタイムアウト

関連しそうなもの

qiita.com

[Google App Engline for Java]SocketTimeoutExceptionの原因 - PSI Labs

https://github.com/square/retrofit/issues/641#issuecomment-60674680

画像アップロートしようとしたら下記のようなエラーで度々止まってひよってる。

それとも、クライアント側で送る前に容量制限するか、画像を縮小かけた方が良いのかな。

メールクライアントとかではよく見かけるけれど...。

1-12 23:36:06.779 20709-22097/com.example.woshidan.localbroadcastreceivertest D/Retrofit: java.net.SocketTimeoutException: timeout
                                                                           at okio.Okio$3.newTimeoutException(Okio.java:207)
                                                                           at okio.AsyncTimeout.exit(AsyncTimeout.java:261)
                                                                           at okio.AsyncTimeout$1.write(AsyncTimeout.java:158)
                                                                           at okio.RealBufferedSink.emitCompleteSegments(RealBufferedSink.java:176)
                                                                           at okio.RealBufferedSink.write(RealBufferedSink.java:46)
                                                                           at com.squareup.okhttp.internal.http.HttpConnection$FixedLengthSink.write(HttpConnection.java:302)
                                                                           at okio.RealBufferedSink.emitCompleteSegments(RealBufferedSink.java:176)
                                                                           at okio.RealBufferedSink$1.write(RealBufferedSink.java:198)
                                                                           at java.io.OutputStream.write(OutputStream.java:82)
                                                                           at retrofit.mime.TypedByteArray.writeTo(TypedByteArray.java:66)
                                                                           at retrofit.client.OkClient$1.writeTo(OkClient.java:88)
                                                                           at com.squareup.okhttp.internal.http.HttpEngine$NetworkInterceptorChain.proceed(HttpEngine.java:887)
                                                                           at com.squareup.okhttp.internal.http.HttpEngine.readResponse(HttpEngine.java:749)
                                                                           at com.squareup.okhttp.Call.getResponse(Call.java:268)
                                                                           at com.squareup.okhttp.Call$ApplicationInterceptorChain.proceed(Call.java:224)
                                                                           at com.squareup.okhttp.Call.getResponseWithInterceptorChain(Call.java:195)
                                                                           at com.squareup.okhttp.Call.execute(Call.java:79)
                                                                           at retrofit.client.OkClient.execute(OkClient.java:53)
                                                                           at retrofit.RestAdapter$RestHandler.invokeRequest(RestAdapter.java:326)
                                                                           at retrofit.RestAdapter$RestHandler.access$100(RestAdapter.java:220)
                                                                           at retrofit.RestAdapter$RestHandler$1.invoke(RestAdapter.java:265)
                                                                           at retrofit.RxSupport$2.run(RxSupport.java:55)
                                                                           at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:422)
                                                                           at java.util.concurrent.FutureTask.run(FutureTask.java:237)
                                                                           at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
                                                                           at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
                                                                           at retrofit.Platform$Android$2$1.run(Platform.java:142)
                                                                           at java.lang.Thread.run(Thread.java:818)
                                                                        Caused by: java.net.SocketException: Socket is closed
                                                                           at com.android.org.conscrypt.OpenSSLSocketImpl.checkOpen(OpenSSLSocketImpl.java:230)
                                                                           at com.android.org.conscrypt.OpenSSLSocketImpl.access$000(OpenSSLSocketImpl.java:57)
                                                                           at com.android.org.conscrypt.OpenSSLSocketImpl$SSLOutputStream.write(OpenSSLSocketImpl.java:725)
                                                                           at okio.Okio$1.write(Okio.java:80)
                                                                           at okio.AsyncTimeout$1.write(AsyncTimeout.java:155)
                                                                           at okio.RealBufferedSink.emitCompleteSegments(RealBufferedSink.java:176) 
                                                                           at okio.RealBufferedSink.write(RealBufferedSink.java:46) 
                                                                           at com.squareup.okhttp.internal.http.HttpConnection$FixedLengthSink.write(HttpConnection.java:302) 
                                                                           at okio.RealBufferedSink.emitCompleteSegments(RealBufferedSink.java:176) 
                                                                           at okio.RealBufferedSink$1.write(RealBufferedSink.java:198) 
                                                                           at java.io.OutputStream.write(OutputStream.java:82) 
                                                                           at retrofit.mime.TypedByteArray.writeTo(TypedByteArray.java:66) 
                                                                           at retrofit.client.OkClient$1.writeTo(OkClient.java:88) 
                                                                           at com.squareup.okhttp.internal.http.HttpEngine$NetworkInterceptorChain.proceed(HttpEngine.java:887) 
                                                                           at com.squareup.okhttp.internal.http.HttpEngine.readResponse(HttpEngine.java:749) 
                                                                           at com.squareup.okhttp.Call.getResponse(Call.java:268) 
                                                                           at com.squareup.okhttp.Call$ApplicationInterceptorChain.proceed(Call.java:224) 
                                                                           at com.squareup.okhttp.Call.getResponseWithInterceptorChain(Call.java:195) 
                                                                           at com.squareup.okhttp.Call.execute(Call.java:79) 
                                                                           at retrofit.client.OkClient.execute(OkClient.java:53) 
                                                                           at retrofit.RestAdapter$RestHandler.invokeRequest(RestAdapter.java:326) 
                                                                           at retrofit.RestAdapter$RestHandler.access$100(RestAdapter.java:220) 
                                                                           at retrofit.RestAdapter$RestHandler$1.invoke(RestAdapter.java:265) 
                                                                           at retrofit.RxSupport$2.run(RxSupport.java:55) 
                                                                           at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:422) 
                                                                           at java.util.concurrent.FutureTask.run(FutureTask.java:237) 
                                                                           at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112) 
                                                                           at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587) 
                                                                           at retrofit.Platform$Android$2$1.run(Platform.java:142) 
                                                                           at java.lang.Thread.run(Thread.java:818