On Sat, Jun 25, 2016 at 06:55:57PM +0200, Joh-Tob Schäg wrote:
> > It will be started by httpGate again on demand. User sessions in turn
> terminate automatically after 5 minutes (if nobody logged in) or 1 hour (if
> a user is logged in), unless JavaScript is enabled in the client browser
> and the application calls
> ( 7)
> in its main 'action' function. In that case, the user session will not
> terminate until the user closes the last window or tab to this application.
>
> Does the session terminate right when the last tab is closed or 5 - 60
> minutes after the last tab was closed. If the former, what is the behavior
> with NoScript or if the Javascript is stopped by the user?
> Are the timeouts (5 min.) hard coded or changable, if so how?
This is a valid question. The issue is rather complicated, and the
documentation terse.
The PicoLisp server by default runs infinitely.
When a client connects, a session in a child process is started.
Without JavaScript, this child will terminate after 5 minutes of
inactivity. If a user logs in, the timeout is 1 hour until he logs
out.
If JavaScript is enabled in the browser, the child runs infinitely as
long as the browser keeps the connection alive with ping messages
(every 20 seconds). 7 minutes after the last ping the child closes.
The session cannot be closed right away when the last tab is closed.
The PicoLisp process doesn't get any note of this. Tabs or whole
browsers can be closed any time, or the connection get lost for other
reasons, and in those cases nothing is sent to the HTTP server. For
that reason the above timeout rules were defined.
This is the behavior of session child processes, and has no influence
on the server.
When the server was started by 'httpGate', and (retire 20) was called
before (server ..), then the *server* process will terminate 20 minutes
after the last child processes closed. It will be restarted by
'httpGate' as soon as the next request arrives.
♪♫ Alex
--
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe