Skip to content

Instantly share code, notes, and snippets.

@hispanic
Created November 26, 2015 12:40
Show Gist options
  • Save hispanic/ab953543ef68c508fb1c to your computer and use it in GitHub Desktop.
Save hispanic/ab953543ef68c508fb1c to your computer and use it in GitHub Desktop.
HttpClient Logging - Connection created
Connection request: [route: {}->http://myhost:8080][total kept alive: 1; route allocated: 1 of 50; total allocated: 2 of 100]
Connection leased: [id: 2][route: {}->http://myhost:8080][total kept alive: 1; route allocated: 2 of 50; total allocated: 3 of 100]
Opening connection {}->http://myhost:8080
@hispanic
Copy link
Author

When a connection is requested and leased, if all of the existing allocations for the route are in use (e.g., a response is pending), “total kept alive” will hold steady and the allocation counts will increment. In this scenario, a new connection is opened (corresponding to the new allocation).

For more information, please see How to Read HttpClient Logging and Prevent Connection Leaks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment