ICEfaces
  1. ICEfaces
  2. ICE-3824

Client should retry application on 500 error responses

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Won't Fix
    • Affects Version/s: None
    • Fix Version/s: 1.8DR#2, 1.8
    • Component/s: Bridge
    • Labels:
      None
    • Environment:
      ICEfaces + Apache or AHS
    • Affects:
      Documentation (User Guide, Ref. Guide, etc.)

      Description

      The latest version of Apache immediately sends back a 500 error when requests are received in the midst of failover or from the AHS server when it handles server side exceptions
      This is potentially better than having the connection hang and go unanswered, but the current handling of this error condition shuts down the bridge.

      We'd like to adopt the strategy of reloading the page once or twice in the case of these errors. There are a couple of considerations. On graceful shutdown of a node, all of the blocking connections will be released nearly simultaneously and the reloads from all of the servers should potentially be spread out over an interval. No attempt should be made before Apache is willing to receive them or this will start looping, which in the case of 2.2.10, is greater than 2.5 seconds, but somewhere less than 5. Configurable by the user might be nice as well.

        Activity

        Greg Dick created issue -
        Hide
        Ted Goddard added a comment -

        A typical strategy in cases like this is to use exponential backoff with steadily increasing delays:

        • 2s delay after first error
        • 4s delay after second error
        • 8s delay after third error
        • abort

        In the full solution, it may also be desirable to delay for a small random amount of time in addition to the incremental delay to avoid all clients hitting the redundant node simultaneously during failover.

        (The initial prototype does not need to account for any of this; simply delaying by a sufficiently long fixed amount before the bridge retries after a 500 error will confirm the approach.)

        Show
        Ted Goddard added a comment - A typical strategy in cases like this is to use exponential backoff with steadily increasing delays: 2s delay after first error 4s delay after second error 8s delay after third error abort In the full solution, it may also be desirable to delay for a small random amount of time in addition to the incremental delay to avoid all clients hitting the redundant node simultaneously during failover. (The initial prototype does not need to account for any of this; simply delaying by a sufficiently long fixed amount before the bridge retries after a 500 error will confirm the approach.)
        Ken Fyten made changes -
        Field Original Value New Value
        Salesforce Case []
        Fix Version/s 1.8DR#2 [ 10142 ]
        Assignee Priority P1
        Assignee Mircea Toma [ mircea.toma ]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #17948 Mon Dec 01 12:57:53 MST 2008 mircea.toma ICE-3824 Implement reload strategy on received server errors -- first cut.
        Files Changed
        Commit graph MODIFY /icefaces/trunk/icefaces/bridge/src/application.js
        Commit graph MODIFY /icefaces/trunk/icefaces/bridge/lib/ajax.js
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #17949 Mon Dec 01 14:45:02 MST 2008 mircea.toma ICE-3824 Introduce "com.icesoft.faces.serverErrorRetryTimeouts" context parameter to configure retry number and wait intervals.
        Files Changed
        Commit graph MODIFY /icefaces/trunk/icefaces/core/src/com/icesoft/faces/context/DOMResponseWriter.java
        Commit graph MODIFY /icefaces/trunk/icefaces/bridge/src/application.js
        Hide
        Mircea Toma added a comment -

        Implement reload strategy on received server errors – first cut.

        Show
        Mircea Toma added a comment - Implement reload strategy on received server errors – first cut.
        Hide
        Mircea Toma added a comment - - edited

        Introduce "com.icesoft.faces.serverErrorRetryTimeouts" context parameter to configure retry number and wait intervals. The parameter needs space separated values which are read as milliseconds.s
        Example:
        <context-param>
        <param-name>com.icesoft.faces.serverErrorRetryTimeouts</param-name>
        <param-value>1500 3000</param-value>
        </context-param>

        Show
        Mircea Toma added a comment - - edited Introduce "com.icesoft.faces.serverErrorRetryTimeouts" context parameter to configure retry number and wait intervals. The parameter needs space separated values which are read as milliseconds.s Example: <context-param> <param-name>com.icesoft.faces.serverErrorRetryTimeouts</param-name> <param-value>1500 3000</param-value> </context-param>
        Mircea Toma made changes -
        Salesforce Case []
        Affects [Documentation (User Guide, Ref. Guide, etc.)]
        Hide
        Ken Fyten added a comment -

        This commit (rev #17949) is causing the following regression test failures:

        Servers tested: Tomcat 5 and 6
        Browsers tested: IE7, FF2, Opera9.27

        Regression

        ICE-3332: failed. Error-page declaration in web.xml doesn't work for specific exception types
        ICE-3007: failed. Exception handling not working

        Show
        Ken Fyten added a comment - This commit (rev #17949) is causing the following regression test failures: Servers tested: Tomcat 5 and 6 Browsers tested: IE7, FF2, Opera9.27 Regression ICE-3332 : failed. Error-page declaration in web.xml doesn't work for specific exception types ICE-3007 : failed. Exception handling not working
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #17953 Tue Dec 02 15:29:01 MST 2008 mircea.toma ICE-3837 Try to re-establish blocking connection on received 500 errors. Revert fixes for ICE-3824.
        Files Changed
        Commit graph MODIFY /icefaces/trunk/icefaces/bridge/src/connection.async.js
        Commit graph MODIFY /icefaces/trunk/icefaces/bridge/src/application.js
        Hide
        Mircea Toma added a comment -

        Implemented different strategy for handling 500 errors. See ICE-3837 .

        Show
        Mircea Toma added a comment - Implemented different strategy for handling 500 errors. See ICE-3837 .
        Mircea Toma made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Won't Fix [ 2 ]
        Ken Fyten made changes -
        Fix Version/s 1.8 [ 10161 ]
        Assignee Priority P1
        Ken Fyten made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Assignee Mircea Toma [ mircea.toma ]

          People

          • Assignee:
            Unassigned
            Reporter:
            Greg Dick
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: