Posts: 204
Threads: 51
Joined: Mar 2018
Reputation:
3
Location: Bryan, TX
Howdy All!
Another thing I am seeing when I stress test my web app that creates a lot of controls is that memory starts growing exponentially and doesn't seem to get released in a decent time period.
In the past there have been discussions on various ways/attempts to automatically shut down sessions before the time-out after a period of no user activity - that is, the time out value gets reset every time the types / clicks a button.
Any ideas/progress on such a method?
Thanks,
Shane
Posts: 17
Threads: 0
Joined: Apr 2018
Reputation:
4
Location: México
Howdy Shane, isn't the TIWServerController.SessionTimeOut workign for you? The value is in minutes and it should do the workig for releasing a session that has been timed out.
Or do you wish to free a certain session on Demand?
Posts: 16
Threads: 0
Joined: Apr 2018
Reputation:
0
Location: israel
08-08-2018, 09:02 PM
(This post was last modified: 08-08-2018, 09:03 PM by EitanArbel.)
doesn't that miss the point of the stress test ?
i wouldn't make my system's "life" easier in tests.
Posts: 2,174
Threads: 184
Joined: Mar 2018
Reputation:
79
Location: Auckland, New Zealand
Hi Shane,
one possibility is setting IWForm.KeepAlive = True for your forms. This is easier accomplished when you use virtual form inheritance, so you set the base form to True and all forms are also set.
Then you can set your ServerController.SessionTimeout to a small value (depending on your case). You can start with 2 minutes, for instance, and see how it goes.
KeepAlive will periodically send an Ajax request to your server and the session won't expire, as long as there is an active form. This might have a potential drawback which is, the session might be active for extremely long periods if the user keep it the browser tab opened.
On the other hand, when the browser tab containing the application closes it will stop sending this request and the session will expire within a shorter time (according to your SessionTimeout setting).