nuBuilder - unwanted logout

Questions related to using nuBuilder Forte.

nuBuilder - unwanted logout

Postby Janusz » Wed Jun 19, 2019 7:59 pm

Hi,
I am receiving often the message:
You must be logged into nuBuilder..
and I need to login again into nubuilder to use it.

there are some posiibiliteis to set-up the Timeout in setup - but it looks - it does not affect or reduce that issue .

Do you have some experience with such issue - or maybe some workaround to minimise the unwanted logout?
Janusz
 
Posts: 260
Joined: Fri Dec 28, 2018 10:11 pm
Location: Krakow, Poland

Re: nuBuilder - unwanted logout

Postby kev1n » Wed Jun 19, 2019 9:53 pm

This "Timeout (minutes)" has been removed a while ago. It might help installing the latest version.
kev1n
 
Posts: 365
Joined: Mon Oct 15, 2018 2:13 am

Re: nuBuilder - unwanted logout

Postby Janusz » Wed Jun 19, 2019 11:30 pm

Yes I know - this field stays on the old form - and it is not present on the recent one.
But anyway the value in the zzzz_.... table remains and is used by code later on with default value of 120minutes.
(The latest version is just removing the field to change this value from the form).
Concerning the php and java script files on the server I have the latest ones.

So general question if anyone is experiencing or not similar issues - maybe someone has some experience how to limit this.

It's not a blocking point at all to use nuBuilder - but it would be nice to have it limited.
Janusz
 
Posts: 260
Joined: Fri Dec 28, 2018 10:11 pm
Location: Krakow, Poland

Re: nuBuilder - unwanted logout

Postby Janusz » Fri Jun 21, 2019 6:24 pm

FYI,
not sure for real cause but probably looks like some network connection disapperance, routing change or whatever happening after some time on idle by client computer.

Now I implementd a kind of cycling ping every one minute from nuBuilder client computer to cloud server - and so far issue is not appearing anymore.
Janusz
 
Posts: 260
Joined: Fri Dec 28, 2018 10:11 pm
Location: Krakow, Poland

Re: nuBuilder - unwanted logout

Postby fpdragon » Fri Aug 23, 2019 5:26 pm

Janusz wrote:FYI,
not sure for real cause but probably looks like some network connection disapperance, routing change or whatever happening after some time on idle by client computer.

Now I implementd a kind of cycling ping every one minute from nuBuilder client computer to cloud server - and so far issue is not appearing anymore.


Could you post your solution please.
Thanks
fpdragon
 
Posts: 38
Joined: Wed May 29, 2019 10:20 pm

Re: nuBuilder - unwanted logout

Postby Janusz » Sat Aug 24, 2019 3:57 am

Hi,
In my case this solution works perfectly since several months with cloud server somewhere in the world.
Before that the database users had connections broken more than 10 times per day with a need to log again and again - currently they are working the whole day with one time login.
But this is not a plug and play solution and must be adjusted carefully to the database structure. In my case I have all forms inside iframes - if not there might be a problem.
So before implementing make a copy of DB - or the best check it on any non production test version of your database - because may happen that it stops to react.
So how is it implemented:
1. Client computer is sending every few minutes to the server via php procedure request to get time:
Procedure name: my_time (with just one line of code)
Code: Select all
$teraz = date('Y-m-d H:i:s');

2. In header I have defined JS function to run it every few minutes
Code: Select all
function refreshServerConnection() {
x = 240;    //refresh ping in seconds
nuRunPHPHidden('my_time');
setTimeout(refreshServerConnection, x*1000);
}
var my_refresh=0;

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.
Janusz
 
Posts: 260
Joined: Fri Dec 28, 2018 10:11 pm
Location: Krakow, Poland

Re: nuBuilder - unwanted logout

Postby fpdragon » Tue Aug 27, 2019 6:04 pm

Janusz wrote:Hi,
In my case this solution works perfectly since several months with cloud server somewhere in the world.
Before that the database users had connections broken more than 10 times per day with a need to log again and again - currently they are working the whole day with one time login.
But this is not a plug and play solution and must be adjusted carefully to the database structure. In my case I have all forms inside iframes - if not there might be a problem.
So before implementing make a copy of DB - or the best check it on any non production test version of your database - because may happen that it stops to react.
So how is it implemented:
1. Client computer is sending every few minutes to the server via php procedure request to get time:
Procedure name: my_time (with just one line of code)
Code: Select all
$teraz = date('Y-m-d H:i:s');

2. In header I have defined JS function to run it every few minutes
Code: Select all
function refreshServerConnection() {
x = 240;    //refresh ping in seconds
nuRunPHPHidden('my_time');
setTimeout(refreshServerConnection, x*1000);
}
var my_refresh=0;

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.



Thank you very much for your answer.

I understand what you were doing with the work around solution but I'm currently not so familiar with "php procedures". If I understood correctly then this is a defined function on php server side that can be triggered. In the end the "nuRunPHPHidden" triggers php procedures on the server from the browser javascript context. This forces a communication (ping).
But I am having troubles in finding out how I should define such a procedure.
In phpMyAdmin I found out that I can define Procedures by following these steps:
*) changing to the DB
*) click on "Procedures" tab
*) click on "Add Procedure"
But here I have the problem that it seems that the tool only allows SQL syntax for the procedure definition. Even if "NO SQL" is selected.

Where do I have to define this php procedure?
Can't I use just an other php function like getdate()?

Thanks
fpdragon
 
Posts: 38
Joined: Wed May 29, 2019 10:20 pm

Re: nuBuilder - unwanted logout

Postby kev1n » Tue Aug 27, 2019 10:01 pm

The procedure can be added here:

Tab Builder -> Procedure -> Build Procedure -> Button Add

procedure.png
procedure.png (5.51 KiB) Viewed 382 times
kev1n
 
Posts: 365
Joined: Mon Oct 15, 2018 2:13 am

Re: nuBuilder - unwanted logout

Postby Janusz » Tue Aug 27, 2019 10:16 pm

fpdragon,
and, by the way - how often do you experiece similar issue?
is it on the local network or with remote server?
Janusz
 
Posts: 260
Joined: Fri Dec 28, 2018 10:11 pm
Location: Krakow, Poland

Re: nuBuilder - unwanted logout

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

kev1n wrote:The procedure can be added here:

Tab Builder -> Procedure -> Build Procedure -> Button Add

procedure.png


ahhhh...

I see.
Thank you.

Now I am testing.
fpdragon
 
Posts: 38
Joined: Wed May 29, 2019 10:20 pm

Next

Return to General