With OkHttp library, application is facing following SocketTimeoutException issue. If request size is less, then it is working fine(Less than 1MB). I a
OkHttp
SocketTimeoutException
For OkHttp 3 the default value for OkHttp is 10 seconds. You can increase the timeout to 30 seconds.
OkHttpClient client = new OkHttpClient(); client.setConnectTimeout(30, TimeUnit.SECONDS); // connect timeout client.setReadTimeout(30, TimeUnit.SECONDS); // socket timeout