Jump to content

Time-consuming process loses connection


Luciano França

Recommended Posts

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

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

 

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

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

  • Like 1
  • Happy 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...