nuBuilder - unwanted logout

Questions related to using nuBuilder Forte.

Re: nuBuilder - unwanted logout

Postby fpdragon » Tue Aug 27, 2019 10:41 pm

Janusz wrote:fpdragon,
and, by the way - how often do you experiece similar issue?
is it on the local network or with remote server?


The issue happens on the local network but in different v-lans.

I'm not sure but I think something between 30 minutes and 2 hours no use the disconnect happens. The main problem is that the user is not notified that he/she got logged out. So it happens that one likes to enter data in the current form and when "save" is pressed everything just entered is lost.

I expect that a network device (switch, firewall, ...) is the cause of the problem. However I still need a workaround on nubuilder level to at least detect the disconnect.
fpdragon
 
Posts: 38
Joined: Wed May 29, 2019 10:20 pm

Re: nuBuilder - unwanted logout

Postby Janusz » Tue Aug 27, 2019 11:12 pm

additionally make sure that your computers are not going to quick into sleep mode - this will cause connection loose as well.
On my computers I keep - go to sleep after 2h (monitor off can be set to any value).
Keep in mind that your forms must be inside iframes if not the save buttons on the forms will go to red (it was at least in my case)

Let us know the status after implementing this solution and after some time of verification.
If you like nuBuilder, please leave a review on SourceForge
Janusz
 
Posts: 358
Joined: Fri Dec 28, 2018 10:11 pm
Location: Krakow, Poland

Re: nuBuilder - unwanted logout

Postby fpdragon » Mon Sep 02, 2019 4:59 pm

Hello.

I have an update.

I added the procedure and added the javascript code to the index.php file in the <head> section.
No javascript errors in the browser's debug console.

But still, after waiting some time I got logged out without seeing something on the website. I have to navigate to an other site or press on save to get the error message that I'm not logged in.

So the workarround is still not working. :-(

To the other questions: I took care of that my computer does not go to sleep. I expect that the connection drops are caused by a network device but I don't think that this problem will be solved in short time. So I need a workaround.

Just for understanding:
every nubuilder session login is dropped when the tcp ip connection is closed? Is there a way to keep sessions open, even if the connection is lost? Just like most of the website does like google and co. My login is kept even if the turn off my pc or the connection is lost.
fpdragon
 
Posts: 38
Joined: Wed May 29, 2019 10:20 pm

Re: nuBuilder - unwanted logout

Postby Janusz » Mon Sep 02, 2019 5:32 pm

Concerning the:
Code: Select all
if (my_refresh===0) {refreshServerConnection(); my_refresh++;}
$('#FF_refresh').val(my_refresh);

is it placed in the custome code JS on the:
nuuserhome
form?
If you like nuBuilder, please leave a review on SourceForge
Janusz
 
Posts: 358
Joined: Fri Dec 28, 2018 10:11 pm
Location: Krakow, Poland

Re: nuBuilder - unwanted logout

Postby Janusz » Tue Sep 03, 2019 10:58 am

and to verify if the php procedure is working in cycling mode you can add nuDebug as following:
Code: Select all
$teraz = date('Y-m-d H:i:s');
nuDebug($teraz);

and check in debug if time is recorded every some minutes.
If you like nuBuilder, please leave a review on SourceForge
Janusz
 
Posts: 358
Joined: Fri Dec 28, 2018 10:11 pm
Location: Krakow, Poland

Re: nuBuilder - unwanted logout

Postby fpdragon » Tue Sep 03, 2019 5:23 pm

Thank you.

I added the javascript code directly to the index.php file. Does it really make any difference if you add the code to the nuuserhome form?

I added the debug command the the php procedure.
In zzzzsys_debug I get cyclic entries so I guess the code is executed correctly.

No idea why I still get logged out without seeing any message.
fpdragon
 
Posts: 38
Joined: Wed May 29, 2019 10:20 pm

Re: nuBuilder - unwanted logout

Postby Janusz » Wed Sep 04, 2019 12:05 am

I added the javascript code directly to the index.php file. Does it really make any difference if you add the code to the nuuserhome form?

if you can see the cycling time record in the Debug from code point of view it's OK.
From my side I have no more ideas what can be done more.
Now I am 7000km away from my home (and from my server) and I can use my databases with no issues - so probaly you must verify something internally with the network.
Maybe you can try as well to set in apache2 server the time out to much higher values if small number of people is using that server.

/etc/apache2/apache2.conf
# Timeout 300
Timeout .....
#KeepAliveTimeout 5
KeepAliveTimeout .....
but if it helps or have other negative impact on the system I do not know - but if you have no other choice maybe you can try.
https://stackoverflow.com/questions/566 ... nd-timeout
If you like nuBuilder, please leave a review on SourceForge
Janusz
 
Posts: 358
Joined: Fri Dec 28, 2018 10:11 pm
Location: Krakow, Poland

Re: nuBuilder - unwanted logout

Postby kev1n » Wed Oct 14, 2020 3:16 pm

Janusz wrote:3. The JS function is stared from the main form of database with following code:
Code: Select all
if (my_refresh===0) {refreshServerConnection(); my_refresh++;}

and this is the whole setting.


Can't you start it in the (Setup ->) header directly or is there any drawback?
kev1n
 
Posts: 1038
Joined: Mon Oct 15, 2018 2:13 am

Re: nuBuilder - unwanted logout

Postby Janusz » Wed Oct 14, 2020 5:13 pm

It was probably that when you login as globeadmin it does not start immidiatelly - so it's easier to test and set-up. It starts when you enter "User Home".
For normal user it makes no difference - it starts immidiatelly after login.
If you like nuBuilder, please leave a review on SourceForge
Janusz
 
Posts: 358
Joined: Fri Dec 28, 2018 10:11 pm
Location: Krakow, Poland

Re: nuBuilder - unwanted logout

Postby kev1n » Wed Oct 14, 2020 5:15 pm

The thing is, if you log in passing another form id (not userhome), e.g. /nubuilder/index.php?f=5ac594150f25e50, the timer won't start. Therefore I thought it's better to place the timer code in the header and not in a form.
kev1n
 
Posts: 1038
Joined: Mon Oct 15, 2018 2:13 am

PreviousNext

Return to General