John,

On Mon, Mar 6, 2017 at 7:31 AM, John DeSoi via 4D_Tech <[email protected]
> wrote:

> > And on a related note - if I set the session timeout to something long,
> say
> > 3 days, and the process timeout to something like an hour (so I don't
> have
> > a bunch of idle web processes hanging out) I can use the On web session
> > suspend command to save the session parameters when the PROCESS closes
> > down. But how do I know that particular SESSION is resuming?
>
> I have not used this, but my assumption is you would keep track of the
> suspended sessions by their cookie. In On Web Connection you would look at
> your suspended sessions and restore the session if the cookie matched. You
> can avoid doing this check on every request by setting a process variable
> once you have an authenticated session. Just be sure to clear it when the
> session is suspended.
>

That works as long as the process hasn't closed. My initial thought was the
cookie's session id would remain constant for the life of the cookie (ie
session timeout). That's not what I have seen though. A unique session id
is assigned by 4D when it creates a session process. I tried reading the
cookie of new processes before doing anything else but this always comes
back empty until it gets set by 4D with the current session id. This makes
sense - but it doesn't give me a way to recognize the unexpired session in
the context of this particular process. ​

​​I suppose I'm questioning if setting the 'Web inactive session timeout'
even matters so long as it's at least as long as the process timeout. Is
there any difference between the 'session' and the process that session is
running in? If there is I'm missing it. If there's not then the solution is
like Tim's tech note and you outline, track it by something else like user
id and basically ignore session timeout.

-- 
Kirk Brooks
San Francisco, CA
=======================
**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:[email protected]
**********************************************************************

Reply via email to