I had the same problem and I found the fix.
This timeout is because of a connection leak. In my case, I’m using httpDelete
method and not consuming the response. Instead, I’m checking the status of the response.
The fix is, the response entity needs to be consumed. In order to ensure the proper release of system resources, one must close the content stream associated with the entity.
So I used EntityUtils.consumeQuietly(response.getEntity());
which ensures that the entity content is fully consumed and the content stream, if exists, is closed.