Win a copy of The Way of the Web Tester: A Beginner's Guide to Automating Tests this week in the Testing forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Read Timeout Exception

matt alberty
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Have a question. I'm using the apache http client to connect over https through a proxy server.

In our production environment we get around 5 - 10 of the following error daily: Read timed out

Any ideas on what might be causing this or suggestions on how to try and isolate it?

if (password != null && userName != null) {
debugLog( "invokeWebService: setting HTTP credentials & to do Authentication" );
org.apache.commons.httpclient.Credentials httpCredentials = new org.apache.commons.httpclient.UsernamePasswordCredentials( userName, password );
// httpClient
httpClient.getState().setCredentials( org.apache.commons.httpclient.auth.AuthScope.ANY, httpCredentials );
poster.setDoAuthentication( true );
if (proxyHost != null) {
debugLog("Proxy settings were present in the config file - will set the proxy in the httpClient");
httpClient.getHostConfiguration().setProxy(proxyHost, proxyPort);
debugLog( "invokeWebService: Post HTTP" );
httpClient.executeMethod( poster );
int status = poster.getStatusCode();
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic