Memory Leak In Jersey REST API.
(Doc ID 2023551.1)
Last updated on JUNE 07, 2023
Applies to:Oracle WebLogic Server - Version 220.127.116.11.0 and later
Information in this document applies to any platform.
Facing a problem of heap saturation when using a service based on the 2.5.1 version Jersey REST API.
To reproduce the issue:
- Use two Weblogic servers, each with a service based on REST (REST servlet on input and RESTclient for output)
- Inject a load on the service. The test reproduced using 13 transactions per second.
- The saturation appears after 20 minutes with 1Gb of heap memory.
- The increase of the response time starts with the REST output (from 100ms up to 120s) and contaminates the REST input (from 40 ms up to 12s).
What can be seen after first analysis is a huge creation of instances in Jersey, a lot of class loading and class initialisation.
In particular, instances of org.glassfish.jersey.client.ClientRuntime are created at the rate of the REST output transactions. It behaves as if the Jersey client instance (org.glassfish.jersey.client.JerseyClient, a singleton for this service) recreates the entire call stack for each connection.
To view full details, sign in with your My Oracle Support account.
Don't have a My Oracle Support account? Click to get started!
In this Document