Re: How to prevent a session creation?
"Chuck Esterbrook" <[email protected]> Sat, 4 Aug 2007 16:34:54 -0700
| Newsgroups | gmane.comp.python.webware |
|---|---|
| Message-ID | <[email protected]> |
On 8/4/07, sophana <[email protected]> wrote: > Hi > > While trying to debug my webware application, I tried to stress it with > a simple wget loop. > I saw that memory was increasing. > After searching a little, I found out that it was webware sessions that > were growing up to the max dynamic session limit. > Using cookie option of wget made no more session creation... > > My application set a session variable at each visit.. So I though it is > a normal behaviour. > But I have a page which is dedicated to monitoring. I thought that by > making the monitoring servlet a subclass of Page, webware would no more > allocate a new session at each wget access. > But it does allocate a session at each wget access! > Is it normal that a session is created even if I don't use it? > How can I prevent webware from creating a session? > > Thanks for your help If you never access self.session() then it should not be created. But as soon as you do, I don't see how WebKit has any other choice but to create it. You can safely check for a session without creating one with self.transaction().hasSession() and then only update the session if there is one. Several of my apps have done so to avoid the problem you describe. -Chuck ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/