RAP application hangs after 3 minutes inactivity [message #1861547] |
Wed, 18 October 2023 07:07  |
Eclipse User |
|
|
|
We are in the process of upgrading from RAP 3.12 to 3.26 and notice what appears to be a change in behaviour with session life.
If we start a session of an application and wait 3 minutes without any activity, the next activity hangs and never comes back. By 'activity', I mean something like a mouse click on a Button control (any interaction by user with the UI in fact).
We use Server Push, no different compared to 3.12.
In addition, we can optionally initiate a browser-side poll to keep the session alive (by default we don't do this) by putting this JS into the browser:
"setInterval(function(){ rwt.remote.Connection.getInstance().send(); }, " + 1000 * keepAliveCycle + ");"
With this in place, the application does come back, but responses to any user interaction are very very slow and unusable (responses are the same period as specified in the JS above, which we tend to default to 5 seconds). It is as if the RAP runtime has given up with the connection and only responds when forced from the browser. It is like ServerPush no longer exists.
Has something changed between 3.12 and 3.26 with regard to how sessions timeout or keepalive? Sorry, this is a big jump in versions!
I will continue to investigate by simplifying our application to try to identify if there is some specific feature we are using that causes it (there is a lot going on!), but if anyone has any ideas about change in behaviour of RAP that might explain it, then I'd love to know!
Note: same behaviour on all browser types that we've tested, so not specific to one.
Also note: this is with basic OSGi, not using any proper AppServer (haven't tested that).
Thanks, John
[Updated on: Wed, 18 October 2023 08:10] by Moderator
|
|
|
|
|
|
Re: RAP application hangs after 3 minutes inactivity [message #1861645 is a reply to message #1861644] |
Wed, 25 October 2023 05:10  |
Eclipse User |
|
|
|
Hi,
the idea behind this change is the following. When you have a background thread to monitor some parameters frequently (let say every 50ms), you add runnables to the display.a/syncExec every 50ms. This will release the server push request and send another one every 50 ms. In most of the cases these runnables are just empty (don't do any UI updates), but we can't distinguish this. With the request release interval you can set the minimum time after the server push request is sent before you release it. For example every 50 ms you add runnables (some of them empty), but you release the server push request (and trigger the UI request) once per 500 ms. Then you execute all the accumulated runnables together (in a single UI update).
I hope that my explanation is clear enough.
Best regards,
Ivan
|
|
|
Powered by
FUDForum. Page generated in 0.03405 seconds