Details
-
Type: Bug
-
Status: Closed
-
Priority: Blocker
-
Resolution: Fixed
-
Affects Version/s: 3.3, EE-3.3.0.GA_P01
-
Fix Version/s: 4.0.BETA, EE-3.3.0.GA_P02, 4.0
-
Component/s: Push Library
-
Labels:None
-
Environment:ICEpush (asynchronous and thread blocking mode)
Description
- Found an issue with AsyncAdaptingServlet:
* When using async-supported we use the AsyncAdaptingServlet and its AsyncRequestResponse class
* Upon an incoming request we get the AsyncContext and set the timeout as follows:
long heartbeatTimeout = configuration.getAttributeAsLong("heartbeatTimeout", ConfigurationServlet.DefaultHeartbeatTimeout);
asyncContext.setTimeout(heartbeatTimeout * 2);
* If I'm not mistaken, this ends up to be a constant 30 seconds
* Meaning it will automatically timeout after 30 seconds and sends some default request (which I don't know the details of)
* As we're using the Adaptive Heartbeat, these 30 seconds won't be enough
* ThreadBlockingRequestResponse does have an additional timeout mechanism as well, but it's set to 600 seconds
- As the ICEpush mechanism itself in any environment times out using a <noop /> response after 3 * heartbeatTimeout or after configured maxHeartbeatInterval, the AsyncRequestResponse's AsyncContext.setTimeout(timeout) and ThreadBlockingRequestResponse's Semaphore.tryAcquire(timeout, TimeUnit) should exceed the 3 * heartbeatTimeout or configured maxHeartbeatInterval
* When using async-supported we use the AsyncAdaptingServlet and its AsyncRequestResponse class
* Upon an incoming request we get the AsyncContext and set the timeout as follows:
long heartbeatTimeout = configuration.getAttributeAsLong("heartbeatTimeout", ConfigurationServlet.DefaultHeartbeatTimeout);
asyncContext.setTimeout(heartbeatTimeout * 2);
* If I'm not mistaken, this ends up to be a constant 30 seconds
* Meaning it will automatically timeout after 30 seconds and sends some default request (which I don't know the details of)
* As we're using the Adaptive Heartbeat, these 30 seconds won't be enough
* ThreadBlockingRequestResponse does have an additional timeout mechanism as well, but it's set to 600 seconds
- As the ICEpush mechanism itself in any environment times out using a <noop /> response after 3 * heartbeatTimeout or after configured maxHeartbeatInterval, the AsyncRequestResponse's AsyncContext.setTimeout(timeout) and ThreadBlockingRequestResponse's Semaphore.tryAcquire(timeout, TimeUnit) should exceed the 3 * heartbeatTimeout or configured maxHeartbeatInterval
Issue Links
- blocks
-
PUSH-316 REGRESSION: IllegalStateException when blocking connection is idling
- Closed
Sending core/src/main/java/org/icepush/servlet/AsyncAdaptingServlet.java
Sending core/src/main/java/org/icepush/servlet/BrowserBoundServlet.java
Sending core/src/main/java/org/icepush/servlet/EnvironmentAdaptingServlet.java
Sending core/src/main/java/org/icepush/servlet/ThreadBlockingAdaptingServlet.java
Transmitting file data ....
Committed revision 40351.
Sending core-ee/src/main/java/com/icesoft/icepush/BrowserBoundServlet.java
Sending eps/src/main/java/com/icesoft/push/servlet/BrowserBoundServlet.java
Transmitting file data ..
Committed revision 37630.
Sending src/main/java/com/icesoft/notify/push/servlet/AsyncAdaptingServlet.java
Sending src/main/java/com/icesoft/notify/push/servlet/EnvironmentAdaptingServlet.java
Sending src/main/java/com/icesoft/notify/push/servlet/ThreadBlockingAdaptingServlet.java
Sending src/main/java/com/icesoft/notify/server/NotificationResource.java
Transmitting file data ....
Committed revision 37631.