Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » RAP application hangs after 3 minutes inactivity(Upgrade RAP 3.12 to 3.26, hangs application after 3 minutes unused)
RAP application hangs after 3 minutes inactivity [message #1861547] Wed, 18 October 2023 11:07 Go to next message
John Gymer is currently offline John GymerFriend
Messages: 279
Registered: November 2012
Location: UK
Senior Member
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


---
Just because you can doesn't mean you should

[Updated on: Wed, 18 October 2023 12:10]

Report message to a moderator

Re: RAP application hangs after 3 minutes inactivity [message #1861551 is a reply to message #1861547] Wed, 18 October 2023 12:32 Go to previous messageGo to next message
John Gymer is currently offline John GymerFriend
Messages: 279
Registered: November 2012
Location: UK
Senior Member
Further information, maybe an explanation?

As part of our ServerPush setup we are always calling:
ServerPushManager.getInstance().setRequestCheckInterval(interval);

<interval> is an application-configurable variable we provide, but this defaults to 0 if nothing is specified.

It appears that the change in behaviour in RAP occurs when setRequestCheckInverval(0) is used. Any other value and we have no issues.

Question to the RAP team then... was this a change somewhere between RAP 3.12 and 3.26? No problem either way, as we can ensure that 0 value is never used e.g. minimum allowed coud be 1000ms, but would just like to understand if this was a change in RAP behaviour, or whether we are still looking for another explanation?

Thanks, John

EDIT: seems that we were not setting the interval to 0 after all - it was the absence of setting an interval at all that caused the problem... if we set interval to any positive value then it cures the problem. In RAP 3.12 we never set it at all and it worked ok.


---
Just because you can doesn't mean you should

[Updated on: Wed, 18 October 2023 12:37]

Report message to a moderator

Re: RAP application hangs after 3 minutes inactivity [message #1861643 is a reply to message #1861551] Wed, 25 October 2023 07:56 Go to previous messageGo to next message
Ivan Furnadjiev is currently offline Ivan FurnadjievFriend
Messages: 2427
Registered: July 2009
Location: Sofia, Bulgaria
Senior Member
Hi John,

yes... we changed the ServerPush manager a little bit for our internal purposes, but I don't understand how this will be connected to your issue.
See this commit [1].
Why you set the check request interval to zero?

[1] https://github.com/eclipse-rap/org.eclipse.rap/commit/387dcfca79a043a89b42446ad52f6ebf4a09ce6a

Best regards,
Ivan
Re: RAP application hangs after 3 minutes inactivity [message #1861644 is a reply to message #1861643] Wed, 25 October 2023 08:14 Go to previous messageGo to next message
Peter Hermsdorf is currently offline Peter HermsdorfFriend
Messages: 45
Registered: August 2011
Member
Hi Ivan,

bonus question: what can be achived by setting setRequestReleaseInterval on the ServerPushManager? i.e. how does this setting changes/affects server push?

Thank you.

Bye Peter
Re: RAP application hangs after 3 minutes inactivity [message #1861645 is a reply to message #1861644] Wed, 25 October 2023 09:10 Go to previous message
Ivan Furnadjiev is currently offline Ivan FurnadjievFriend
Messages: 2427
Registered: July 2009
Location: Sofia, Bulgaria
Senior Member
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
Previous Topic:Dynamic theme
Next Topic:How to add apple-touch-icon?
Goto Forum:
  


Current Time: Tue Dec 03 21:07:17 GMT 2024

Powered by FUDForum. Page generated in 0.03012 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top