ICEfaces
  1. ICEfaces
  2. ICE-4396

Timing issue between removal of ice.session from cookie and shutting down bridge

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.8
    • Fix Version/s: 1.8.1
    • Component/s: Bridge, Framework
    • Labels:
      None
    • Environment:
      Oracle/BEA WebLogic Server 10.3 Cluster, ICEfaces 1.8.0

      Description

      Using a cluster of WebLogic Servers, fail-over seems to cause the old bridge instance not to shutdown properly causing an excessive amount of receive-updated-views requests not containing the ice.session.

        Activity

        Hide
        Jack Van Ooststroom added a comment -

        Changed Fix Version(s) to 1.8.1

        Show
        Jack Van Ooststroom added a comment - Changed Fix Version(s) to 1.8.1
        Hide
        Jack Van Ooststroom added a comment -

        Assigning to Mircea...

        Show
        Jack Van Ooststroom added a comment - Assigning to Mircea...
        Hide
        Ken Fyten added a comment -

        Need to verify this change using all use-cases that can result in the bridge triggering a "reload", such as reload navigation.

        Show
        Ken Fyten added a comment - Need to verify this change using all use-cases that can result in the bridge triggering a "reload", such as reload navigation.
        Hide
        Mircea Toma added a comment -

        Shutdown bridge as soon as 'reload' command is received to avoid having a blocking connection running with no participating session ID.

        Show
        Mircea Toma added a comment - Shutdown bridge as soon as 'reload' command is received to avoid having a blocking connection running with no participating session ID.
        Hide
        Deryk Sinotte added a comment -

        Prior to ICEfaces 1.8, the list of ice.session values was stored in a JavaScript global window variable. New ice.session values would be added when a new view was loaded and automatically cleaned up when the window closed. These values are now stored in a cookie. This allows the values to be shared across all the windows/tabs for a given domain, but it also requires that we manually manage the loading and removal of values - when all the views for a particular ice.session are gone, the ice.session value is removed.

        The problem in ICEfaces 1.8.0 is that the code to remove the ice.session values from the cookie executes before the page is fully unloaded. This results in a potential timing issue where a reload (e.g. caused by an attempt to failover to a different node in a cluster) causes the ice.session value to be removed but the blocking connection (used for Ajax Push) still attempts to re-establish itself without a valid ice.session being available. Continued and repeated attempts are made by the blocking connection until the page reload occurs and before the ICEfaces bridge is completely shut down, resulting in the noted error messages.

        The effect in the browser can be fairly innocuous depending on the number of attempts made to re-establish the blocking connection and the time it takes for the page reload to shut down the bridge and reload the page. However, if many attempts are made, then the browser may appear unresponsive for an indeterminant amount of time.

        The problem has been solved in the upcoming ICEfaces 1.8.1 by shutting down the bridge earlier, so that the blocking connection never attempts to re-establish contact without a valid ice.session value in the cookie.

        Show
        Deryk Sinotte added a comment - Prior to ICEfaces 1.8, the list of ice.session values was stored in a JavaScript global window variable. New ice.session values would be added when a new view was loaded and automatically cleaned up when the window closed. These values are now stored in a cookie. This allows the values to be shared across all the windows/tabs for a given domain, but it also requires that we manually manage the loading and removal of values - when all the views for a particular ice.session are gone, the ice.session value is removed. The problem in ICEfaces 1.8.0 is that the code to remove the ice.session values from the cookie executes before the page is fully unloaded. This results in a potential timing issue where a reload (e.g. caused by an attempt to failover to a different node in a cluster) causes the ice.session value to be removed but the blocking connection (used for Ajax Push) still attempts to re-establish itself without a valid ice.session being available. Continued and repeated attempts are made by the blocking connection until the page reload occurs and before the ICEfaces bridge is completely shut down, resulting in the noted error messages. The effect in the browser can be fairly innocuous depending on the number of attempts made to re-establish the blocking connection and the time it takes for the page reload to shut down the bridge and reload the page. However, if many attempts are made, then the browser may appear unresponsive for an indeterminant amount of time. The problem has been solved in the upcoming ICEfaces 1.8.1 by shutting down the bridge earlier, so that the blocking connection never attempts to re-establish contact without a valid ice.session value in the cookie.

          People

          • Assignee:
            Mircea Toma
            Reporter:
            Jack Van Ooststroom
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: