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

        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.
        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

          People

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

            Dates

            • Created:
              Updated:
              Resolved: