ICEfaces
  1. ICEfaces
  2. ICE-8218

Improve "View Limit Exceeded" error message

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: EE-1.8.2.GA_P04
    • Fix Version/s: EE-1.8.2.GA_P05
    • Component/s: Framework
    • Labels:
      None
    • Environment:
      ICEfaces 3.x
    • Assignee Priority:
      P3
    • Affects:
      Documentation (User Guide, Ref. Guide, etc.)

      Description

      It would be useful to expand the current "View Limit Exceeded" error message to also explain that there might be a missing disposeView listener implementation as a cause.
      It would also be useful for the framework to track if any views are ever reclaimed during the session prior to the limit being exceeded, as an indicator that the application as not implemented the proper view disposal code.

        Activity

        Ken Fyten created issue -
        Ken Fyten made changes -
        Field Original Value New Value
        Salesforce Case []
        Fix Version/s 3.1 [ 10312 ]
        Assignee Priority P3
        Assignee Deryk Sinotte [ deryk.sinotte ]
        Ken Fyten made changes -
        Salesforce Case []
        Fix Version/s EE-1.8.2.GA_P05 [ 10331 ]
        Affects Version/s EE-1.8.2.GA_P04 [ 10280 ]
        Affects Version/s 3.0.1 [ 10282 ]
        Ken Fyten made changes -
        Salesforce Case []
        Fix Version/s 3.1 [ 10312 ]
        Hide
        Ted Goddard added a comment -

        There are typically three causes for this message:

        • a misconfigured load test: the load test does not accurately capture ICEfaces HTTP traffic and is not sending window dispose messages
        • broken image links that point to an ICEfaces page, typically because of catch-all servlet or HTTP server mappings
        • custom JavaScript that interferes with onBeforeUnload

        As an enhancement to the current debug mode for view disposal, it would make sense at session shutdown to log the number of views created and the number of views disposed in that session.

        Show
        Ted Goddard added a comment - There are typically three causes for this message: a misconfigured load test: the load test does not accurately capture ICEfaces HTTP traffic and is not sending window dispose messages broken image links that point to an ICEfaces page, typically because of catch-all servlet or HTTP server mappings custom JavaScript that interferes with onBeforeUnload As an enhancement to the current debug mode for view disposal, it would make sense at session shutdown to log the number of views created and the number of views disposed in that session.
        Arran Mccullough made changes -
        Salesforce Case [5007000000MHR4Y]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #32165 Wed Nov 14 17:19:55 MST 2012 deryk.sinotte ICE-8218: improve View creation and disposal logging to help diagnose problems
        Files Changed
        Commit graph ADD /icefaces/trunk/icefaces/core/src/com/icesoft/faces/context/ViewStatus.java
        Commit graph MODIFY /icefaces/trunk/icefaces/core/src/com/icesoft/faces/webapp/http/core/DisposeViews.java
        Commit graph MODIFY /icefaces/trunk/icefaces/core/src/com/icesoft/faces/webapp/http/core/SingleViewServer.java
        Commit graph MODIFY /icefaces/trunk/icefaces/core/src/com/icesoft/faces/webapp/http/servlet/SessionDispatcher.java
        Commit graph MODIFY /icefaces/trunk/icefaces/core/src/com/icesoft/faces/webapp/http/core/MultiViewServer.java
        Commit graph MODIFY /icefaces/trunk/icefaces/core/src/com/icesoft/faces/context/View.java
        Hide
        Deryk Sinotte added a comment - - edited

        I've made a few changes to how View creation and disposal logging works in 1.8. All of the related logging occurs under the log for the com.icesoft.faces.context.View class. This means that to turn it on, you just need to set the level for that class. For example, in the log4j.xml file that we ship with component-showcase, you can add the following entry:

            <category name="com.icesoft.faces.context.View">
                <priority value="debug"/>
            </category>
        

        Doing this will turn on logging that will record all View creation and disposal and track active views within a session that have not yet been disposed. If the logging level is not set to debug, no tracking is done. The new logging looks like this in the console:
        Initial page load of http://localhost:8080/component-showcase/showcase.iface:

        DEBUG - created View[Un-JuW8yLrXz5Oac_KFXdg:1] for http://localhost:8080/component-showcase/showcase.iface - com.icesoft.faces.context.View 

        After a reload:

        DEBUG - disposed View[Un-JuW8yLrXz5Oac_KFXdg:1] - com.icesoft.faces.context.View  
        DEBUG - created View[Un-JuW8yLrXz5Oac_KFXdg:2] for http://localhost:8080/component-showcase/showcase.iface - com.icesoft.faces.context.View

        If I intentionally add in a typical View leak problem (like a custom 404 error handler that uses ICEfaces), the initial page load will show:

        DEBUG - created View[Un-JuW8yLrXz5Oac_KFXdg:1] for http://localhost:8080/component-showcase/showcase.iface - com.icesoft.faces.context.View  
        DEBUG - created View[Un-JuW8yLrXz5Oac_KFXdg:2] for http://localhost:8080/component-showcase/error.iface - com.icesoft.faces.context.View  
        DEBUG - created View[Un-JuW8yLrXz5Oac_KFXdg:3] for http://localhost:8080/component-showcase/error.iface - com.icesoft.faces.context.View  
        DEBUG - created View[Un-JuW8yLrXz5Oac_KFXdg:4] for http://localhost:8080/component-showcase/error.iface - com.icesoft.faces.context.View  
        DEBUG - created View[Un-JuW8yLrXz5Oac_KFXdg:5] for http://localhost:8080/component-showcase/error.iface - com.icesoft.faces.context.View  
        DEBUG - created View[Un-JuW8yLrXz5Oac_KFXdg:6] for http://localhost:8080/component-showcase/error.iface - com.icesoft.faces.context.View 

        A reload will show:

        DEBUG - disposed View[Un-JuW8yLrXz5Oac_KFXdg:1] - com.icesoft.faces.context.View  
        DEBUG - created View[Un-JuW8yLrXz5Oac_KFXdg:7] for http://localhost:8080/component-showcase/showcase.iface - com.icesoft.faces.context.View  
        DEBUG - created View[Un-JuW8yLrXz5Oac_KFXdg:8] for http://localhost:8080/component-showcase/error.iface - com.icesoft.faces.context.View  
        DEBUG - created View[Un-JuW8yLrXz5Oac_KFXdg:9] for http://localhost:8080/component-showcase/error.iface - com.icesoft.faces.context.View  
        DEBUG - created View[Un-JuW8yLrXz5Oac_KFXdg:10] for http://localhost:8080/component-showcase/error.iface - com.icesoft.faces.context.View  
        DEBUG - created View[Un-JuW8yLrXz5Oac_KFXdg:11] for http://localhost:8080/component-showcase/error.iface - com.icesoft.faces.context.View  
        DEBUG - created View[Un-JuW8yLrXz5Oac_KFXdg:12] for http://localhost:8080/component-showcase/error.iface - com.icesoft.faces.context.View  

        Note that there is only 1 View disposed so we have a leak. If I intentionally try to exceed the view limit (lowered to 10 for this example):

        WARN  - Concurrent view limit of 10 exceeded for session nKNtkZ6gGm2zTNZHRL6JMQ - com.icesoft.faces.webapp.http.core.MultiViewServer  
        INFO  - views for session: nKNtkZ6gGm2zTNZHRL6JMQ
          created : 13
          disposed: 2
          active  : 11
        {3=http://localhost:8080/component-showcase/error.iface, 2=http://localhost:8080/component-showcase/error.iface, 10=http://localhost:8080/component-showcase/error.iface, 6=http://localhost:8080/component-showcase/error.iface, 5=http://localhost:8080/component-showcase/error.iface, 4=http://localhost:8080/component-showcase/error.iface, 9=http://localhost:8080/component-showcase/error.iface, 8=http://localhost:8080/component-showcase/error.iface, 13=http://localhost:8080/component-showcase/showcase.iface, 11=http://localhost:8080/component-showcase/error.iface, 12=http://localhost:8080/component-showcase/error.iface} - com.icesoft.faces.context.View  

        Or I can let the session expire:

        DEBUG - disposed View[Un-JuW8yLrXz5Oac_KFXdg:3] - com.icesoft.faces.context.View  
        DEBUG - disposed View[Un-JuW8yLrXz5Oac_KFXdg:2] - com.icesoft.faces.context.View  
        DEBUG - disposed View[Un-JuW8yLrXz5Oac_KFXdg:10] - com.icesoft.faces.context.View  
        DEBUG - disposed View[Un-JuW8yLrXz5Oac_KFXdg:7] - com.icesoft.faces.context.View  
        DEBUG - disposed View[Un-JuW8yLrXz5Oac_KFXdg:6] - com.icesoft.faces.context.View  
        DEBUG - disposed View[Un-JuW8yLrXz5Oac_KFXdg:5] - com.icesoft.faces.context.View  
        DEBUG - disposed View[Un-JuW8yLrXz5Oac_KFXdg:4] - com.icesoft.faces.context.View  
        DEBUG - disposed View[Un-JuW8yLrXz5Oac_KFXdg:9] - com.icesoft.faces.context.View  
        DEBUG - disposed View[Un-JuW8yLrXz5Oac_KFXdg:8] - com.icesoft.faces.context.View  
        DEBUG - disposed View[Un-JuW8yLrXz5Oac_KFXdg:11] - com.icesoft.faces.context.View  
        DEBUG - disposed View[Un-JuW8yLrXz5Oac_KFXdg:12] - com.icesoft.faces.context.View  
        INFO  - views for session: Un-JuW8yLrXz5Oac_KFXdg
          created : 12
          disposed: 12
          active  : 0
        {} - com.icesoft.faces.context.View  
        Show
        Deryk Sinotte added a comment - - edited I've made a few changes to how View creation and disposal logging works in 1.8. All of the related logging occurs under the log for the com.icesoft.faces.context.View class. This means that to turn it on, you just need to set the level for that class. For example, in the log4j.xml file that we ship with component-showcase, you can add the following entry: <category name= "com.icesoft.faces.context.View" > <priority value= "debug" /> </category> Doing this will turn on logging that will record all View creation and disposal and track active views within a session that have not yet been disposed. If the logging level is not set to debug, no tracking is done. The new logging looks like this in the console: Initial page load of http://localhost:8080/component-showcase/showcase.iface: DEBUG - created View[Un-JuW8yLrXz5Oac_KFXdg:1] for http: //localhost:8080/component-showcase/showcase.iface - com.icesoft.faces.context.View After a reload: DEBUG - disposed View[Un-JuW8yLrXz5Oac_KFXdg:1] - com.icesoft.faces.context.View DEBUG - created View[Un-JuW8yLrXz5Oac_KFXdg:2] for http: //localhost:8080/component-showcase/showcase.iface - com.icesoft.faces.context.View If I intentionally add in a typical View leak problem (like a custom 404 error handler that uses ICEfaces), the initial page load will show: DEBUG - created View[Un-JuW8yLrXz5Oac_KFXdg:1] for http: //localhost:8080/component-showcase/showcase.iface - com.icesoft.faces.context.View DEBUG - created View[Un-JuW8yLrXz5Oac_KFXdg:2] for http: //localhost:8080/component-showcase/error.iface - com.icesoft.faces.context.View DEBUG - created View[Un-JuW8yLrXz5Oac_KFXdg:3] for http: //localhost:8080/component-showcase/error.iface - com.icesoft.faces.context.View DEBUG - created View[Un-JuW8yLrXz5Oac_KFXdg:4] for http: //localhost:8080/component-showcase/error.iface - com.icesoft.faces.context.View DEBUG - created View[Un-JuW8yLrXz5Oac_KFXdg:5] for http: //localhost:8080/component-showcase/error.iface - com.icesoft.faces.context.View DEBUG - created View[Un-JuW8yLrXz5Oac_KFXdg:6] for http: //localhost:8080/component-showcase/error.iface - com.icesoft.faces.context.View A reload will show: DEBUG - disposed View[Un-JuW8yLrXz5Oac_KFXdg:1] - com.icesoft.faces.context.View DEBUG - created View[Un-JuW8yLrXz5Oac_KFXdg:7] for http: //localhost:8080/component-showcase/showcase.iface - com.icesoft.faces.context.View DEBUG - created View[Un-JuW8yLrXz5Oac_KFXdg:8] for http: //localhost:8080/component-showcase/error.iface - com.icesoft.faces.context.View DEBUG - created View[Un-JuW8yLrXz5Oac_KFXdg:9] for http: //localhost:8080/component-showcase/error.iface - com.icesoft.faces.context.View DEBUG - created View[Un-JuW8yLrXz5Oac_KFXdg:10] for http: //localhost:8080/component-showcase/error.iface - com.icesoft.faces.context.View DEBUG - created View[Un-JuW8yLrXz5Oac_KFXdg:11] for http: //localhost:8080/component-showcase/error.iface - com.icesoft.faces.context.View DEBUG - created View[Un-JuW8yLrXz5Oac_KFXdg:12] for http: //localhost:8080/component-showcase/error.iface - com.icesoft.faces.context.View Note that there is only 1 View disposed so we have a leak. If I intentionally try to exceed the view limit (lowered to 10 for this example): WARN - Concurrent view limit of 10 exceeded for session nKNtkZ6gGm2zTNZHRL6JMQ - com.icesoft.faces.webapp.http.core.MultiViewServer INFO - views for session: nKNtkZ6gGm2zTNZHRL6JMQ created : 13 disposed: 2 active : 11 {3=http: //localhost:8080/component-showcase/error.iface, 2=http://localhost:8080/component-showcase/error.iface, 10=http://localhost:8080/component-showcase/error.iface, 6=http://localhost:8080/component-showcase/error.iface, 5=http://localhost:8080/component-showcase/error.iface, 4=http://localhost:8080/component-showcase/error.iface, 9=http://localhost:8080/component-showcase/error.iface, 8=http://localhost:8080/component-showcase/error.iface, 13=http://localhost:8080/component-showcase/showcase.iface, 11=http://localhost:8080/component-showcase/error.iface, 12=http://localhost:8080/component-showcase/error.iface} - com.icesoft.faces.context.View Or I can let the session expire: DEBUG - disposed View[Un-JuW8yLrXz5Oac_KFXdg:3] - com.icesoft.faces.context.View DEBUG - disposed View[Un-JuW8yLrXz5Oac_KFXdg:2] - com.icesoft.faces.context.View DEBUG - disposed View[Un-JuW8yLrXz5Oac_KFXdg:10] - com.icesoft.faces.context.View DEBUG - disposed View[Un-JuW8yLrXz5Oac_KFXdg:7] - com.icesoft.faces.context.View DEBUG - disposed View[Un-JuW8yLrXz5Oac_KFXdg:6] - com.icesoft.faces.context.View DEBUG - disposed View[Un-JuW8yLrXz5Oac_KFXdg:5] - com.icesoft.faces.context.View DEBUG - disposed View[Un-JuW8yLrXz5Oac_KFXdg:4] - com.icesoft.faces.context.View DEBUG - disposed View[Un-JuW8yLrXz5Oac_KFXdg:9] - com.icesoft.faces.context.View DEBUG - disposed View[Un-JuW8yLrXz5Oac_KFXdg:8] - com.icesoft.faces.context.View DEBUG - disposed View[Un-JuW8yLrXz5Oac_KFXdg:11] - com.icesoft.faces.context.View DEBUG - disposed View[Un-JuW8yLrXz5Oac_KFXdg:12] - com.icesoft.faces.context.View INFO - views for session: Un-JuW8yLrXz5Oac_KFXdg created : 12 disposed: 12 active : 0 {} - com.icesoft.faces.context.View
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #32459 Wed Nov 28 09:51:13 MST 2012 jack.van.ooststroom Fixed JIRA ICE-8218 : Improve 'View Limit Exceeded' error message; moved the view status logging logic into ViewStatus in order to remove the SessionDispatcher dependency on View
        Files Changed
        Commit graph MODIFY /icefaces/trunk/icefaces/core/src/com/icesoft/faces/context/ViewStatus.java
        Commit graph MODIFY /icefaces/trunk/icefaces/core/src/com/icesoft/faces/webapp/http/servlet/SessionDispatcher.java
        Commit graph MODIFY /icefaces/trunk/icefaces/core/src/com/icesoft/faces/webapp/http/core/MultiViewServer.java
        Commit graph MODIFY /icefaces/trunk/icefaces/core/src/com/icesoft/faces/context/View.java
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #32501 Thu Nov 29 09:55:24 MST 2012 deryk.sinotte ICE-8218: revert INFO level logging back to DEBUG
        Files Changed
        Commit graph MODIFY /icefaces/trunk/icefaces/core/src/com/icesoft/faces/context/ViewStatus.java
        Migration made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Migration made changes -
        Affects Documentation (User Guide, Ref. Guide, etc.) [ 10003 ]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #32577 Mon Dec 03 08:26:11 MST 2012 jack.van.ooststroom Fixed JIRA ICE-8218 : Improve 'View Limit Exceeded' error message; ViewStatus now implements Serializable
        Files Changed
        Commit graph MODIFY /icefaces/trunk/icefaces/core/src/com/icesoft/faces/context/ViewStatus.java
        Ken Fyten made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Deryk Sinotte
            Reporter:
            Ken Fyten
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: