Welcome to the nuBuilder Forums!

Register and log in to access exclusive forums and content available only to registered users.

nuBuilder - unwanted logout

Questions related to using nuBuilder Forte.
fpdragon
Posts: 38
Joined: Wed May 29, 2019 2:50 pm

Re: nuBuilder - unwanted logout

Unread post by fpdragon »

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.
Janusz
nuBuilder Team
Posts: 506
Joined: Fri Dec 28, 2018 1:41 pm
Location: Krakow, Poland
Has thanked: 8 times
Been thanked: 18 times

Re: nuBuilder - unwanted logout

Unread post by Janusz »

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
fpdragon
Posts: 38
Joined: Wed May 29, 2019 2:50 pm

Re: nuBuilder - unwanted logout

Unread post by fpdragon »

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.
Janusz
nuBuilder Team
Posts: 506
Joined: Fri Dec 28, 2018 1:41 pm
Location: Krakow, Poland
Has thanked: 8 times
Been thanked: 18 times

Re: nuBuilder - unwanted logout

Unread post by Janusz »

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
nuBuilder Team
Posts: 506
Joined: Fri Dec 28, 2018 1:41 pm
Location: Krakow, Poland
Has thanked: 8 times
Been thanked: 18 times

Re: nuBuilder - unwanted logout

Unread post by Janusz »

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
fpdragon
Posts: 38
Joined: Wed May 29, 2019 2:50 pm

Re: nuBuilder - unwanted logout

Unread post by fpdragon »

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.
Janusz
nuBuilder Team
Posts: 506
Joined: Fri Dec 28, 2018 1:41 pm
Location: Krakow, Poland
Has thanked: 8 times
Been thanked: 18 times

Re: nuBuilder - unwanted logout

Unread post by Janusz »

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
kev1n
nuBuilder Team
Posts: 4305
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 446 times
Contact:

Re: nuBuilder - unwanted logout

Unread post by kev1n »

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?
Janusz
nuBuilder Team
Posts: 506
Joined: Fri Dec 28, 2018 1:41 pm
Location: Krakow, Poland
Has thanked: 8 times
Been thanked: 18 times

Re: nuBuilder - unwanted logout

Unread post by Janusz »

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
kev1n
nuBuilder Team
Posts: 4305
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 446 times
Contact:

Re: nuBuilder - unwanted logout

Unread post by kev1n »

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.
Post Reply