-
1. Re: Memory leak caused by retained instances of BeanManagerImpl / WeldInterceptorClassMetadata
mkouba Dec 9, 2013 4:26 AM (in response to rohit.gupta)Hi Rohit,
what version of Weld do you use? I see that you're using GlassFish - its version would help as well.
-
2. Re: Memory leak caused by retained instances of BeanManagerImpl / WeldInterceptorClassMetadata
rohit.gupta Dec 9, 2013 6:14 AM (in response to mkouba)Hi Martin,
Glassfish version - GlassFish Server Open Source Edition 4.0 (build 89)
Weld version - WELD 2.0.0 (SP1)
Thanks
-
4. Re: Memory leak caused by retained instances of BeanManagerImpl / WeldInterceptorClassMetadata
mkouba Dec 10, 2013 10:23 AM (in response to rohit.gupta)It would be also helpful if you provide some more info about your performance test, e.g. what components and technologies are involved, etc.
-
5. Re: Memory leak caused by retained instances of BeanManagerImpl / WeldInterceptorClassMetadata
rohit.gupta Dec 11, 2013 1:45 AM (in response to mkouba)Hi Martin,
I upgraded to WELD 2.0.4.Final , but I still have the memory leak.
Information about the performance test -
Application Components and Technologies used - JSF Mojarra 2.2.0 and EJB's
The application uses CGI injection to get resources. Also used extensively are the CDI scopes.
Performance test structure - Login - Navigate - Logout (Nothing too complex here)
Test Results -
The test simulates 5 users logged in and and performing the same test sequence 40 times.
The first test run which generates 2000 requests goes fine.
The second test run hangs as there is no more memory available.
The profiler shows Memory usage in the Old Generation gradually go up. During the second test run, the old generation fills up due to too many instances of org.jboss.weld.bean.interceptor.WeldInterceptorClassMetadata. These instances remain in memory even after the test is halted. 3000 requests lead to ~~ 147MB being help in Heap with these instances.
Let me know if you need any more data.
Cheers
Rohit
-
6. Re: Memory leak caused by retained instances of BeanManagerImpl / WeldInterceptorClassMetadata
mkouba Dec 11, 2013 3:52 AM (in response to rohit.gupta)Rohit, would it be possible to provide a simplified test archive (with source code) for the given test case?
-
7. Re: Memory leak caused by retained instances of BeanManagerImpl / WeldInterceptorClassMetadata
jharting Dec 11, 2013 3:52 AM (in response to rohit.gupta)This may be caused by InjectionTargets being created over and over instead of being cached. Are there any other libs used by your application?
-
8. Re: Memory leak caused by retained instances of BeanManagerImpl / WeldInterceptorClassMetadata
rohit.gupta Dec 11, 2013 5:42 AM (in response to jharting)Hi Josef,
Other libs used -
Apache commons libraries
poi:3.9
poi-ooxml:3.9
poi-ooxmk-schemas:3.9
Arquilian
dom4j:1.6.1
fop:0.94
eclipselink:2.5.0
Could you explain to me about the injection targets being used instead of cached.
For me, I use the annotation @Inject and CDI provides me with the resources to be injected.
Thanks
-
9. Re: Memory leak caused by retained instances of BeanManagerImpl / WeldInterceptorClassMetadata
rohit.gupta Dec 17, 2013 9:12 AM (in response to mkouba)I will work on it, should have it in the first week of january
-
10. Re: Memory leak caused by retained instances of BeanManagerImpl / WeldInterceptorClassMetadata
mkouba Dec 17, 2013 9:40 AM (in response to rohit.gupta)Rohit, simplified test case would definitely help us to confirm our hypothesis. Also a fix mentioned in WELD-1564 (which should prevent further mem leaks but will not improve GlassFish integration code efficiency) should be included in a planned 2.0.5.Final release (compatible with GlassFish4).
-
11. Re: Memory leak caused by retained instances of BeanManagerImpl / WeldInterceptorClassMetadata
rohit.gupta Jan 22, 2014 8:22 AM (in response to mkouba)Martin, Replacing the OSGI bundle does not work for upgrading to 2.1.0.
Are there any other steps required?
Also, I have a Test Harness ready which replicates the issue.
You can find it at https://dl.dropboxusercontent.com/u/90469849/TestHarness/TestHarness.rar
The test harness includes a Maven project and a JMETER project to execute the tests.
Thanks
-
12. Re: Memory leak caused by retained instances of BeanManagerImpl / WeldInterceptorClassMetadata
mkouba Jan 22, 2014 8:33 AM (in response to rohit.gupta)1 of 1 people found this helpfulRohit, you can't upgrade to Weld 2.1.x - it's not compatible with GlassFish4. However the fix is also included in 2.0.5.Final.
-
13. Re: Memory leak caused by retained instances of BeanManagerImpl / WeldInterceptorClassMetadata
rohit.gupta Jan 22, 2014 10:02 AM (in response to mkouba)Alright. Has further support for glassfish been stopped?
If it has, this would influence our decision to move to another application server, maybe Wildfly
-
14. Re: Memory leak caused by retained instances of BeanManagerImpl / WeldInterceptorClassMetadata
mkouba Jan 22, 2014 10:16 AM (in response to rohit.gupta)I think this is rather a question for GlassFish team - the responsible integrator.