RFR: 8326498: java.net.http.HttpClient connection leak using http/2 [v2]

Jaikiran Pai jpai at openjdk.org
Wed Nov 19 10:18:27 UTC 2025


On Wed, 12 Nov 2025 11:01:07 GMT, Volkan Yazici <vyazici at openjdk.org> wrote:

> Verify secondary request bursts always reuse the pooled connection,

Unless we set the pool idle timeout to a very high value, it's not always possible to guarantee that the secondary burst will use a pooled connection. And it's OK if the secondary burst doesn't use a pooled connection (if one isn't available). So testing that here, I think, isn't necessary.

> Remember that, as reported in the associated ticket, the secondary bursts were causing the orphan connection pile up.

The secondary burst creating a fresh set of connections will continue to happen if there isn't any pooled connection. The fix in this PR won't address this (unless like I noted we increase the pool timeout to a very high value to force the connection to stay around, even on "slow" CI machines). Our previous discussion around the high connection creation for bursty request was that we would review that code and very likely enhance it in the coming days to improve that to reduce the connection creation. So I think any tests verifying that would be better done as part of that exercise.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/28233#discussion_r2541373458


More information about the net-dev mailing list