11 Replies Latest reply on Jan 9, 2013 11:29 AM by ssilvert

    jsf 2 & Jboss possible memory leak

    thinksteep

      Hi community,  We are observing a strange situation after upgrading from JSF1.2 & Jboss 4.2.3a to JSF2 & JBoss7.1  Lot of heap size is being eaten by jboss class loader & JSF classes.  We are struggling to understand how to contain this.  Here is Eclipse MAT screenshot.

       

       

      EMAT_Screenshot.PNG

       

      As well as VisualVM instance count and size screenshot. Most of the references to HashMap & String objects from JBoss and other libraries. Is there anyway to overcome this? What are the optimal memory settings for JBoss7.1.1? Any help would be appreciated.

      VisualVM.PNG

        • 1. Re: jsf 2 & Jboss possible memory leak
          jaikiran

          Can you try this against latest nightly build? I think there were some fixes in this area, although I don't remember if that was for 7.1.1 or later. See if there's an improvement in the latest builds.

          • 2. Re: jsf 2 & Jboss possible memory leak
            nickarls

            We had slowdown issues on a 7.1.1 that appeared to have eased by downgrading the JSF implementation to 2.1.3. Might be that latest trunk contains some implementation that addresses the issue, haven't checked.

            • 3. Re: jsf 2 & Jboss possible memory leak
              thinksteep

              Hi Jaikiran/Nicklas,  Thanks for quick response.  http://hudson.jboss.org/hudson/view/JBoss%20AS/job/JBoss-AS-7.0.x-Windows/  Do I need to get nightly build from above location?  Thank you,

              • 4. Re: jsf 2 & Jboss possible memory leak
                thinksteep

                Hi Jaikiran, 

                 

                  Are these nightly builds, I need to build from source (or) It is just download the ZIP file and extract (like how we do GA versions)?

                  If this issue is fixed in nightly build, is there any timeline on when next release of Jboss will be available? 

                Thanks for your time and help.

                • 5. Re: jsf 2 & Jboss possible memory leak
                  thinksteep

                  Hi Jaikiran,

                   

                  Today thread dump showing RemoteConnection as culprit. Do you think this area also covered?  We have enabled remoting. This is becoming serious issue as we are nearing production date. Any help would be appreciated.

                   

                  Here is the screenshot.

                   

                  Today_Dump.PNG

                  • 6. Re: jsf 2 & Jboss possible memory leak
                    thinksteep

                    Hi Jaikiran,  How are you?  It seems nightly build is lot better in terms of containing the memory leak issue (JBoss-7.2-ALPHA build). We are doing more testing.  Now, our question is, Is there any time line for JBoss 7.2 release? We have production scheduled for early Sept.  If no timeline for JBoss 7.2 release, is there any way we can patch Jboss 7.1.1 with these memory leak fixes?  Your input will help us in finalizing an approach.  Thanks for your time.

                    • 7. Re: jsf 2 & Jboss possible memory leak
                      danielk

                      Any news on fixes for memory leaks in JBoss AS 7.1.1.final?

                      • 8. Re: jsf 2 & Jboss possible memory leak
                        ssilvert

                        Daniel Ku wrote:

                         

                        Any news on fixes for memory leaks in JBoss AS 7.1.1.final?

                        This can cause a memory leak for view-scoped beans: http://java.net/jira/browse/JAVASERVERFACES-2561.  It is fixed in Mojarra 2.1.16 and AS7.2.  Mojarra 2.1.17 has just been released and I'm evaluating it right now.

                         

                        To hack a fix in AS7.1.x:

                        • Put the jsf-api jar in <JBOSS_HOME>/modules/javax/faces/api/main.  Update modules.xml accordingly.
                        • Put the jsf-impl jar in <JBOSS_HOME>/modules/com/sun/jsf-impl/main.  Update modules.xml accordingly.

                         

                        If anyone has information on another JSF leak please open a jira and assign to me.

                         

                        Thanks,

                         

                        Stan Silvert

                        • 9. Re: jsf 2 & Jboss possible memory leak
                          danielk

                          Thanks for the fast response. JSF 2.1.17 i have already configured (2.1.16 has crucial bugs for ViewScoped beans) in JBoss AS 7.1.1.final. Is there any roadmap (date), when AS7.2 will be released as community version?

                           

                          Thanks in advance,

                           

                          Daniel

                           

                          PS: Is jsf-impl dependency not needed anymore in module.xml for jsf API?

                          • 10. Re: jsf 2 & Jboss possible memory leak
                            ssilvert

                            Daniel Ku wrote:

                             

                            PS: Is jsf-impl dependency not needed anymore in module.xml for jsf API?

                            As far as I know, the dependency is still needed.  Do you have some information that indicates that the issue with that has been resolved?

                             

                            Stan

                            • 11. Re: jsf 2 & Jboss possible memory leak
                              ssilvert

                              Stan Silvert wrote:

                               

                              Daniel Ku wrote:

                               

                              PS: Is jsf-impl dependency not needed anymore in module.xml for jsf API?

                              As far as I know, the dependency is still needed.  Do you have some information that indicates that the issue with that has been resolved?

                               

                              Stan

                              Let me correct that.  As I recall, JSF API depends on JSF impl for JSF 2.2.  For JSF 2.1, the dependency declaration is not needed. 

                               

                              But this might be fixed for JSF 2.2 now.  I don't know.