Re: Unclear distinction between web server session and process
John, OK, I see where I was getting mixed up. The session timeout can be a different length than the process timeout. But in practice the session ceases to persist on 4D unless it's active in a process. So when the process providing the context for the session expires that 'session id' goes too. But it's saved in the cookie and so it's on me to get that cookie early on and restore the context if I care about it. I was thinking 4D would maintain the session id for the duration of the session timeout even if the process the session was running in quit. I see now the session time out is a property of the cookie on the browser and nothing more involved within 4D. When I read through the 'Web Sessions Management' page just now I get what they are saying. The way I read it before I just didn't fully grasp these distinctions. Things are always so much simpler when you understand them. Thanks for the help. -- Kirk Brooks San Francisco, CA === *The only thing necessary for the triumph of evil is for good men to do nothing.* *- Edmund Burke* ** 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:4d_tech-unsubscr...@lists.4d.com **
Re: Unclear distinction between web server session and process
Kirk, Are you sure you have Automatic Session Management checked on Database Setttings/Web/Options(I)? Tom DeMeo ** 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:4d_tech-unsubscr...@lists.4d.com **
Re: Unclear distinction between web server session and process
No direct experience on that, but here are some debugging ideas: - Do you have all the parameters declared in On Web Connection and on Web Authentication? - Put a trace in On Web Session Suspend to see if the session is getting suspended. Might be a bad timeout setting? - Are you changing any of the session parameters from the defaults? If so, maybe try commenting that out. What version are you using? I have mainly used 15.4. If none of that helps, maybe try a HTTP tracer to verify cookie/set-cookie headers are being exchanged as expected. John DeSoi, Ph.D. > On Apr 15, 2017, at 9:40 AM, Kirk Brooks via 4D_Tech <4d_tech@lists.4d.com> > wrote: > > Well that's good news - and I must be inadvertently doing something to > subvert it. Have you stumbled onto things that do would cause 4D to ignore > it? ** 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:4d_tech-unsubscr...@lists.4d.com **
Re: Unclear distinction between web server session and process
John, Well that's good news - and I must be inadvertently doing something to subvert it. Have you stumbled onto things that do would cause 4D to ignore it? On Fri, Apr 14, 2017 at 5:51 PM, John DeSoi via 4D_Tech < 4d_tech@lists.4d.com> wrote: > Hi Kirk, > > > On Apr 14, 2017, at 11:33 AM, Kirk Brooks via 4D_Tech < > 4d_tech@lists.4d.com> wrote: > > > > But that's not the way I see it actually work. A new process spins up > each > > time new request comes in and gets assigned a new web session id which > > replaces whatever the 4DSID cookie is. > > This is not what I'm seeing using 4D's http client. Server returns > "set-cookie" header and I use that value for subsequent requests. Any > further request using this cookie gets routed to the same process on the > web server. > > -- Kirk Brooks San Francisco, CA === *The only thing necessary for the triumph of evil is for good men to do nothing.* *- Edmund Burke* ** 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:4d_tech-unsubscr...@lists.4d.com **
Re: Unclear distinction between web server session and process
Hi Kirk, > On Apr 14, 2017, at 11:33 AM, Kirk Brooks via 4D_Tech <4d_tech@lists.4d.com> > wrote: > > But that's not the way I see it actually work. A new process spins up each > time new request comes in and gets assigned a new web session id which > replaces whatever the 4DSID cookie is. This is not what I'm seeing using 4D's http client. Server returns "set-cookie" header and I use that value for subsequent requests. Any further request using this cookie gets routed to the same process on the web server. John DeSoi, Ph.D. ** 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:4d_tech-unsubscr...@lists.4d.com **
Unclear distinction between web server session and process
Since I'm focused on the webserver today, I'm coming back to not being clear on the distinction 4D makes between a 'web session' and the 'web process' when using automatic session management. A web session, as I understand it, is an authorized connection between a browser and the server and usually designated with a cookie. 4D uses the 4DSID cookie and there's a database param that let's me set the cookie timeout period. When a new connection is made from a browser 4D looks for the cookie and if it's there looks for a web process with that session id. If it finds a process it should use it, if it doesn't (and the cookie is still valid) it starts a new process which should have that session ID assigned to it. But that's not the way I see it actually work. A new process spins up each time new request comes in and gets assigned a new web session id which replaces whatever the 4DSID cookie is. So I've got the feeling I'm not using the automatic session features the way they should be - or it's something else. Again, comments from folks doing more of this stuff are much appreciated. Kirk Brooks San Francisco, CA === *The only thing necessary for the triumph of evil is for good men to do nothing.* *- Edmund Burke* ** 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:4d_tech-unsubscr...@lists.4d.com **