Im using okhttp 2.5.0, im taking a pic, then converting it into base 64 format and then sending it to server as a post variable, then decoding it back to jpg format and saving to into the server.... when i use small images like 1 mega pixel (0.5mb) it works perfectly... but when I increase the resolution this Exception occurs...
09-10 23:29:47.673 25742-27156/in.definexit.chemapp W/System.err﹕ java.net.SocketTimeoutException: timeout
09-10 23:29:47.676 25742-27156/in.definexit.chemapp W/System.err﹕ at okio.Okio$3.newTimeoutException(Okio.java:207)
09-10 23:29:47.676 25742-27156/in.definexit.chemapp W/System.err﹕ at okio.AsyncTimeout.exit(AsyncTimeout.java:261)
09-10 23:29:47.677 25742-27156/in.definexit.chemapp W/System.err﹕ at okio.AsyncTimeout$1.write(AsyncTimeout.java:158)
09-10 23:29:47.677 25742-27156/in.definexit.chemapp W/System.err﹕ at okio.RealBufferedSink.emitCompleteSegments(RealBufferedSink.java:176)
09-10 23:29:47.677 25742-27156/in.definexit.chemapp W/System.err﹕ at okio.RealBufferedSink.write(RealBufferedSink.java:46)
09-10 23:29:47.677 25742-27156/in.definexit.chemapp W/System.err﹕ at com.squareup.okhttp.internal.http.HttpConnection$FixedLengthSink.write(HttpConnection.java:302)
09-10 23:29:47.677 25742-27156/in.definexit.chemapp W/System.err﹕ at okio.RealBufferedSink.emitCompleteSegments(RealBufferedSink.java:176)
09-10 23:29:47.677 25742-27156/in.definexit.chemapp W/System.err﹕ at okio.RealBufferedSink.write(RealBufferedSink.java:96)
09-10 23:29:47.679 25742-27156/in.definexit.chemapp W/System.err﹕ at com.squareup.okhttp.RequestBody$2.writeTo(RequestBody.java:96)
09-10 23:29:47.679 25742-27156/in.definexit.chemapp W/System.err﹕ at com.squareup.okhttp.MultipartBuilder$MultipartRequestBody.writeOrCountBytes(MultipartBuilder.java:277)
09-10 23:29:47.682 25742-27156/in.definexit.chemapp W/System.err﹕ at com.squareup.okhttp.MultipartBuilder$MultipartRequestBody.writeTo(MultipartBuilder.java:297)
09-10 23:29:47.682 25742-27156/in.definexit.chemapp W/System.err﹕ at com.squareup.okhttp.internal.http.HttpEngine$NetworkInterceptorChain.proceed(HttpEngine.java:887)
09-10 23:29:47.682 25742-27156/in.definexit.chemapp W/System.err﹕ at com.squareup.okhttp.internal.http.HttpEngine.readResponse(HttpEngine.java:749)
09-10 23:29:47.682 25742-27156/in.definexit.chemapp W/System.err﹕ at com.squareup.okhttp.Call.getResponse(Call.java:268)
09-10 23:29:47.684 25742-27156/in.definexit.chemapp W/System.err﹕ at com.squareup.okhttp.Call$ApplicationInterceptorChain.proceed(Call.java:224)
09-10 23:29:47.685 25742-27156/in.definexit.chemapp W/System.err﹕ at com.squareup.okhttp.Call.getResponseWithInterceptorChain(Call.java:195)
09-10 23:29:47.686 25742-27156/in.definexit.chemapp W/System.err﹕ at com.squareup.okhttp.Call.execute(Call.java:79)
09-10 23:29:47.686 25742-27156/in.definexit.chemapp W/System.err﹕ at in.definexit.chemapp.BGServerScripts.doInBackground(BGServerScripts.java:112)
09-10 23:29:47.686 25742-27156/in.definexit.chemapp W/System.err﹕ at in.definexit.chemapp.BGServerScripts.doInBackground(BGServerScripts.java:27)
09-10 23:29:47.686 25742-27156/in.definexit.chemapp W/System.err﹕ at android.os.AsyncTask$2.call(AsyncTask.java:292)
09-10 23:29:47.686 25742-27156/in.definexit.chemapp W/System.err﹕ at java.util.concurrent.FutureTask.run(FutureTask.java:237)
09-10 23:29:47.687 25742-27156/in.definexit.chemapp W/System.err﹕ at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231)
09-10 23:29:47.687 25742-27156/in.definexit.chemapp W/System.err﹕ at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
09-10 23:29:47.687 25742-27156/in.definexit.chemapp W/System.err﹕ at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
09-10 23:29:47.687 25742-27156/in.definexit.chemapp W/System.err﹕ at java.lang.Thread.run(Thread.java:818)
09-10 23:29:47.687 25742-27156/in.definexit.chemapp W/System.err﹕ Caused by: java.net.SocketException: Socket closed
09-10 23:29:47.690 25742-27156/in.definexit.chemapp W/System.err﹕ at libcore.io.Posix.sendtoBytes(Native Method)
09-10 23:29:47.690 25742-27156/in.definexit.chemapp W/System.err﹕ at libcore.io.Posix.sendto(Posix.java:206)
09-10 23:29:47.690 25742-27156/in.definexit.chemapp W/System.err﹕ at libcore.io.BlockGuardOs.sendto(BlockGuardOs.java:278)
09-10 23:29:47.691 25742-27156/in.definexit.chemapp W/System.err﹕ at libcore.io.IoBridge.sendto(IoBridge.java:513)
09-10 23:29:47.691 25742-27156/in.definexit.chemapp W/System.err﹕ at java.net.PlainSocketImpl.write(PlainSocketImpl.java:504)
09-10 23:29:47.691 25742-27156/in.definexit.chemapp W/System.err﹕ at java.net.PlainSocketImpl.access$100(PlainSocketImpl.java:37)
09-10 23:29:47.691 25742-27156/in.definexit.chemapp W/System.err﹕ at java.net.PlainSocketImpl$PlainSocketOutputStream.write(PlainSocketImpl.java:266)
09-10 23:29:47.691 25742-27156/in.definexit.chemapp W/System.err﹕ at okio.Okio$1.write(Okio.java:80)
09-10 23:29:47.691 25742-27156/in.definexit.chemapp W/System.err﹕ at okio.AsyncTimeout$1.write(AsyncTimeout.java:155)
09-10 23:29:47.692 25742-27156/in.definexit.chemapp W/System.err﹕ ... 22 more
i tried increasing post and upload size in php.ini, increasing the timout of asynctask and okhttp client, nothing worked