Skip to content
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

Unexpected memory usage in JAXRS client when using query parameters #30773

Open
HeinzHuberRsg opened this issue Feb 12, 2025 · 0 comments
Open
Labels
release bug This bug is present in a released version of Open Liberty

Comments

@HeinzHuberRsg
Copy link

Describe the bug
When a JAXRS client is created, it creates a WebTarget which has the following implementation as delegate:
https://github.com/OpenLiberty/open-liberty/blob/2fd4a880754c37a988c5ed9ac4f1ea5988e465d6/dev/com.ibm.ws.org.apache.cxf.cxf.rt.rs.client.3.2/src/org/apache/cxf/jaxrs/client/spec/ClientImpl.java

This WebTarget calls JAXRSClientConfigHolder.getURIProps(..)

as a result, in
https://github.com/OpenLiberty/open-liberty/blob/e09e937bd8e87ee850c82fc5b6f8a50a736edb28/dev/com.ibm.ws.org.apache.cxf.cxf.rt.rs.client.3.2/src/com/ibm/ws/jaxrs21/clientconfig/JAXRSClientConfigHolder.java
the URI is put into the static Map resolvedConfigInfo.

This leads to an unexpected memory usage since the key also includes parameter values!

Steps to Reproduce

  • Create a JAXRS client for a URL with parameters in it.
  • Call the client with various parameters.
  • Memory increases with every call.

Expected behavior
The memory doesn't increase when a client calls the same endpoint with various parameters.

Diagnostic information:

  • OpenLiberty Version: 24.0.0.8
  • Affected feature(s) restfulWS-3.1
  • Java Version: openjdk version "17.0.2" 2022-01-18 LTS
    OpenJDK Runtime Environment 21.9 (build 17.0.2+8-LTS)
    OpenJDK 64-Bit Server VM 21.9 (build 17.0.2+8-LTS, mixed mode, sharing)

Additional context
None

@HeinzHuberRsg HeinzHuberRsg added the release bug This bug is present in a released version of Open Liberty label Feb 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release bug This bug is present in a released version of Open Liberty
Projects
None yet
Development

No branches or pull requests

1 participant