I've been experiencing something similar using HttpClient (also using URLConnection):
java.net.SocketTimeoutException: The operation timed out The quick fix seems to be retrying the connection, but I'd like to think there's a better way of handling it. On May 4, 1:26 am, Paul Tongyoo <paul.tong...@gmail.com> wrote: > Hi all-- > > I'm receiving "SocketTimeoutException: Read Timed Out" errors in my client > app when attempting to post image data to a central server over HTTPS. > What's odd is that I cannot reproduce the error when posting data from my > local machine (via the emulator) to the same server. Increasing the > SO_TIMEOUT value seems to only prolong the amount of time it takes for the > timeout exception to occur. I am very new to using the Apache HTTP API - > what am I missing? > > HttpClient httpClient = new DefaultHttpClient(); > HttpConnectionParams.setSoTimeout(httpClient.getParams(), 15000); > HttpConnectionParams.setConnectionTimeout(httpClient.getParams(), 15000); > HttpPost post = new HttpPost("https://...."); > > ... > > HttpResponse response = httpClient.execute(post); // Exception occurs here > > ... > > httpClient.getConnectionManager().shutdown(); // Closes the connection > successfully? > > TIA > Paul > > -- > You received this message because you are subscribed to the Google > Groups "Android Developers" group. > To post to this group, send email to android-developers@googlegroups.com > To unsubscribe from this group, send email to > android-developers+unsubscr...@googlegroups.com > For more options, visit this group > athttp://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en