ICEpush
  1. ICEpush
  2. PUSH-148

Servlet 3.0 ARP's timeout interferes with ICEpush' heartbeat mechanism

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0-Alpha3
    • Fix Version/s: 2.0-Beta
    • Component/s: Push Library
    • Labels:
      None
    • Environment:
      Apache Tomcat 7, ICEpush

      Description

      Servlet 3.0's AsyncContext uses a timeout mechanism for pending requests. The default timeout is dependent on the container. However, this timeout can potentially interfere with ICEpush' heartbeat mechanism. When a pending request gets timed out by Servlet 3.0 before the next ping comes in the following Exception can be experienced:

      Caused by: java.lang.IllegalStateException: The request associated with the AsyncContext has already completed processing.
      at org.apache.catalina.core.AsyncContextImpl.check(AsyncContextImpl.java:436)
      at org.apache.catalina.core.AsyncContextImpl.complete(AsyncContextImpl.java:87)
      at org.icepush.servlet.AsyncAdaptingServlet$AsyncRequestResponse.respondWith(AsyncAdaptingServlet.java:66)
      at org.icepush.BlockingConnectionServer.respondIfPendingRequest(BlockingConnectionServer.java:131)
      ... 38 more

        Issue Links

          Activity

          Hide
          Jack Van Ooststroom added a comment -

          The AsyncAdaptingServlet now takes a Configuration in its constructor as well. The configuration is used to get the heartbeatTimeout from the web.xml using 15000 as the default value as used elsewhere in the ICEpush code. The heartbeatTimeout value is used to set the timeout on the AsyncContext on a per-request basis, by multiplying the heartbeatTimeout by 2.

          Marking this one as FIXED.

          Show
          Jack Van Ooststroom added a comment - The AsyncAdaptingServlet now takes a Configuration in its constructor as well. The configuration is used to get the heartbeatTimeout from the web.xml using 15000 as the default value as used elsewhere in the ICEpush code. The heartbeatTimeout value is used to set the timeout on the AsyncContext on a per-request basis, by multiplying the heartbeatTimeout by 2. Marking this one as FIXED.

            People

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

              Dates

              • Created:
                Updated:
                Resolved: