-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Resource not closed warning with rest client #10813
Comments
We saw that issue in our project first on June 18th when we bumped Quarkus from 1.3.2 to 1.5.1 |
What scope is the client? |
MP RC spec says |
The destroyer was not setup, so request scoped instances (or @dependent instances injected into request scoped beans) would not be destroyed. Also wired this up correctly in ArC. Fixes quarkusio#10813
Still happening at Quarkus 2.4.0-Final |
@bbntrk this is likely a different issue, please file a new one with a reproducer. |
I am still getting the same error 2.7.5 Final. It happens almost everytime an internal REST call happens (i.e. with the Keycloak API), or an explicit one when Testing with RESTAssured.
After running all my tests, the whole console is full of those messages. They usually appear after a timeout of a couple of seconds. |
We had this problem for a long time now, too. Now we found at least a workaround. Using Quarkus 2.7.4.Final with kotlin. Reproduce:
As you can see, the dependency injection is sufficient to reproduce the error. I don't make any actuall call to the RestClient.
the warning occurs (for about 2500 requests nothing happens and then all open clinets seem to be forced closed):
The important part here is that the RestClient is not a singleton. Thus, a new instance seems to be created for each request and is not closed.
I can no longer reproduce the error. Sounds plausible to me because only one client is ever created. But actually, shouldn't a connection pool be used, that closes the clients even when Edit: even with |
Still happening on quarkus 2.8.0-FINAL |
This is a bit hard to reproduce for me. Like in #10804 I am doing remote calls via the MP Rest Client
And I get (not always) the following in the logs:
2020-07-17 16:58:30,999 WARN [org.jbo.res.cli.jax.i18n] (Finalizer) RESTEASY004687: Closing a class org.jboss.resteasy.client.jaxrs.engines.ApacheHttpClient43Engine instance for you. Please close clients yourself.
Locally I could reproduce it now with the remote service returning a 401, but I also see that on our production instance, where I do not see any errors from the remote call.
Commenting out the
@CacheResult()
makes the warning/stack trace go away, but still shows the Finalizer-warning.The text was updated successfully, but these errors were encountered: