-
Notifications
You must be signed in to change notification settings - Fork 356
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Setting ExecutorService causes connection leak #4683
Comments
Well, at the time line 464 It seems that if there should be some default, it may be better set very early in the |
The origin comes from 2.29.1, where the fix provided the ExecutorService for a custom The behaviour you experience is as expected, for every connector Jersey supports. Whenever a property is changed or a provider is registered after the On the other hand, I agree that it is not necessary to recreate a new Connector for every |
3d04682#r45995045
GET
against/jax-rs-books/sync
, one at a time, no concurrency needed - pooled connections get reused with all ConnectorsGET
against/jax-rs-books/rx
, one at a time - pooled connections are not reused with Jetty and Netty connectors.This can be seen to happen due to this (added an Exception that traces the creation point for
NettyConnector
, it is not really thrown, just logging):It seems that the culprit is line
jersey/core-client/src/main/java/org/glassfish/jersey/client/JerseyInvocation.java
Line 464 in 3d04682
Connector
for every request, and stops leaking the connections.Perhaps,
ClientConfig.State
copying done as part ofClientConfig.executorService(provided)
goes awry.Reproducible on
2.33
and a few earlier builds. (Perhaps all the way to 2.31 where that line has been introduced, but I can't go below 2.31 because of the fixes that went into it)The text was updated successfully, but these errors were encountered: