I'm using httpclient 4.4.1 with Jersey 2.19 and have spent some time troubleshooting a problem with http connections to a specific server A leased from the PoolingClientConnectionManager which are never made available again because they are never released. Our per route for A maxes out and a portion of our app locks up within the connection manger waiting for an available connection.
Connections are properly released when i connected to a different server B, so i compared the calls from both A & B and the one difference i noticed was the successful one to B was not getting a compressed response. When connecting to server B, the EOF detector released the connection to the connection manager successfully, for A with a compressed response, the EOF detector never releases the connection. When i enable the "contentCompressionDisabled" flag manually for A within the HttpClientBuilder, the connection to server A works as the EOF detector correctly releases the connection. Should gzip compression affect the ability for the EOF detector to release the connection back to the pool ? If not, then i think this may be a bug. David