Comments (4)
I have investigated the issue in more detail and found the problem in the hk2-api
library - see eclipse-ee4j/glassfish-hk2#949
from jersey.
This causes us big problems in the production - our servers must be restarted frequently. Could somebody suggest us at least a workaround (manual cleanup)? I tried to analyze the heap dump but unfortunately i was not able to detect the original cause yet. It seems that ClientRuntime
instances hang somewhere in
org.glassfish.hk2.internal.PerThreadContext$PerContextThreadWrapper.table(SystemDescriptor -> SecureSaxParserFactory)
.
from jersey.
As per the description, you would like to use one client for many requests. But in the reproducer you are creating as much clients as requests.
You can perfectly create one client for all requests like:
@Test
public void testMemoryConsumption() {
int max = 100_000_000;
try (final Client client = ClientBuilder.newClient()) {
for (int i = 0; i < max; i++) {
client.target(getBaseUri())
.path("memTest")
//.request(MediaType.APPLICATION_JSON)
.request(MediaType.APPLICATION_XML_TYPE)
.get(MemTestDto.class);
if (i % 1_000 == 0) {
System.out.println("attempt=" + i);
}
}
}
}
and this will pass the test.
from jersey.
Sure it will pass the test, but it does not solve the memory leak. We need to solve the leak.
At least, if we knew where the leak comes from (which package/class/method to look for it), we would definitely find a workaround. Could somebody, who knows the code a bit, help us, please?
from jersey.
Related Issues (20)
- 3.1.4 broken release, JettyConnectorProvider always throws exception HOT 2
- Shall we start a 4.0 branch? HOT 8
- Getting rid of `new File(URL.getPath()).toURI()` HOT 3
- @Context annotation declaration of HttpServletReqeuest object in parent reference is passing the first time API hit values to the resource always HOT 3
- Unbounded memory use of LRUMap due to removed access synchronization in ProviderBase HOT 6
- Can I add custom formatting settings to Gson in jersey-media-json-gson? HOT 2
- How to disable JaxRSFeature.READ_FULL_STREAM? HOT 2
- jersey-netty-connector: response body not processed when content-length/transfer-encoding headers are not present
- jersey-media-json-binding 3.0.12 has two impls of parsson on classpath
- InjectionManagerFactory not found in OSGi http service with Declarative service HOT 3
- 2.x/examples/osgi-helloworld-webapp does not work with Jetty 12 but with Jetty 10 HOT 12
- Connectivity issues masked by ProcessingException: Already connected HOT 1
- IllegalAccessException in jersey-client-proxy when `@BeanParam` annotated class contains private fields
- ServletContext is invalid in MessageBodyWriter if handling async CompletionStage HOT 3
- Headers modified by MultiPartWriter are not sent HOT 2
- HttpUrlConnector and JettyConnector doesn't log the headers modified by MultiPartWriter HOT 2
- [Micrometer] suport for the @Counted annotation
- Wrong CDI-SE context is requested using jersey-media-jaxb versions 3.1.2 and higher running in a weld/grizzly container HOT 2
- jersey-netty-connector - Cancelling the future returned by rx() client does not terminate the request HOT 4
- Project Loom/JDK 21 compatible HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jersey.