Luciano França Posted March 6, 2023 Share Posted March 6, 2023 Which property should I configure for when taking a report for example that can take about 5 minutes do not give me the reconnection message "Connection Error Communication failure 0 Retrying" Link to comment Share on other sites More sharing options...
Abaksoft Posted March 6, 2023 Share Posted March 6, 2023 1 hour ago, Luciano França said: "Connection Error Communication failure 0 Retrying" Hello, Just put an UniTimer (1000 ms) on the mainform. • Set it enabled:=True on Activate mainform event • its procedure is empty This is a tip that maintain your session activate permanently. But... http://forums.unigui.com/index.php?/topic/17841-how-to-manage-expired-login-sessions-gracefully/&do=findComment&comment=97224 Link to comment Share on other sites More sharing options...
Luciano França Posted March 7, 2023 Author Share Posted March 7, 2023 13 hours ago, Abaksoft said: Hello, Just put an UniTimer (1000 ms) on the mainform. • Set it enabled:=True on Activate mainform event • its procedure is empty This is a tip that maintain your session activate permanently. But... http://forums.unigui.com/index.php?/topic/17841-how-to-manage-expired-login-sessions-gracefully/&do=findComment&comment=97224 I tried using the UniTimer approach but it didn't work See this attached demo. Session Active.7z Link to comment Share on other sites More sharing options...
Abaksoft Posted March 8, 2023 Share Posted March 8, 2023 21 hours ago, Luciano França said: I tried using the UniTimer approach but it didn't work Hello, Session Active: Time Out There are three things to know : 1.SessionTimeOut: ServerModule > SessionTimeOut = 600 000 (by default 10 min) 2. Session open indefinitely: MainModule > Event SessionTimeOut: ExtendTimeOut :=600 000; // 10 min more, each time: never stop! (Better than putting an empty Unitimer on mainForm) ExtendTimeOut is not recommanded when you have many sessions opened (consum many ressources). 3. Long treatment: ServerModule > AjaxTimeOut = 30 000 (by default 30 sec) --> extend it... always it is necessary that: SessionTimeOut > AjaxTimeOut _________________________ In your case the most important parameter is AjaxTimeOut. Extend it to 100 000 If you have somme long Reports tasks or DB queries, extend your AjaxTimeOut. Enjoy... SessionActive_2.7z Link to comment Share on other sites More sharing options...
irigsoft Posted March 8, 2023 Share Posted March 8, 2023 21 hours ago, Luciano França said: I tried using the UniTimer approach but it didn't work See this attached demo. Session Active.7z 5.84 kB · 1 download Hello, I had a similar problem, when I run a long-running request (AdoQuery), my connections break after ajaxTimeout. I extended the AdoConnection timeout and that fixed my session disconnection issue. So, you might try changing the AdoConnection.timeout in addition to Abaksoft's advice 1 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now