On 25/05/2016 13:54, Oleg Kalnichevski wrote:

Tim,

Please post wire / context log of the session.

Oleg


I found the issue eventually. It was due a leaking connection (InputStream not being closed). The problem was masked by no timeout being applied to getting a connection so it hung forever. Setting that helped track down the problem. I then created a custom PoolingHttpClientConnectionManager that I could them inspect to find out where the leaking connections were happening. My intialisation now looks like this:

RequestConfig requestConfig = RequestConfig.custom()
        .setConnectionRequestTimeout(4000)
        .setConnectTimeout(4000)
        .setSocketTimeout(4000).build();

connectionManager =new 
PoolingHttpClientConnectionManager();connectionManager.setDefaultMaxPerRoute(10);

httpclient = HttpClients.custom()
        .setConnectionManager(connectionManager)
        .setDefaultRequestConfig(requestConfig).build();

Tim

Reply via email to