So many Internal Session ID's - is something wrong?

View: New views
7 Messages — Rating Filter:   Alert me  

So many Internal Session ID's - is something wrong?

by David Ringsmuth :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

A4D v 3.0

4D v2003.8r2

Windows Vista Business 32bit, SP1

 

When displaying the A4d Session Monitor I see hundreds of internal session
ID's created for just a very little activity.

 

Reading through the documentation I do not understand why all of these are
created. It seems there should only be internal sessions ID's created for
session that interact with the public session ID's. ( a 1 to 1 relationship)

 

It appears to create session ID's for every call to the web server. Is this
correct?

 

THANKS for helping me understand and correct something that may be wrong!

 

 

_______________________________________________
Active4D-dev mailing list
Active4D-dev@...
http://mailman.aparajitaworld.com/mailman/listinfo/active4d-dev
Archives: http://mailman.aparajitaworld.com/archive/active4d-dev/

Re: So many Internal Session ID's - is something wrong?

by aparajita :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

> It appears to create session ID's for every call to the web server.  
> Is this
> correct?

 From the documentation:

When Active4D Sends Session Cookies
Even though Active4D generates a session ID when a client accesses  
your site, it does not
create the session in memory or send a session cookie to the client  
unless when one of
the following happens:

- The On Session Start event handler is defined (it need not set any  
session data)
- A script sets some session data
- A script uses the session command to get a session iterator

Is one of those conditions true in your site?

Regards,

    Aparajita
    www.aparajitaworld.com

    "If you dare to fail, you are bound to succeed."
    - Sri Chinmoy   |   www.srichinmoy.org


_______________________________________________
Active4D-dev mailing list
Active4D-dev@...
http://mailman.aparajitaworld.com/mailman/listinfo/active4d-dev
Archives: http://mailman.aparajitaworld.com/archive/active4d-dev/

Re: So many Internal Session ID's - is something wrong?

by David Ringsmuth :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I have an "On Session Start" handler.

I have now set the default session time-out to .1, which seems to clean-up
the zombie session every 10 seconds.

-----Original Message-----
From: active4d-dev-bounces@...
[mailto:active4d-dev-bounces@...] On Behalf Of Aparajita
Fishman
Sent: Wednesday, July 02, 2008 5:41 PM
To: active4d-dev@...
Subject: Re: [Active4d-dev] So many Internal Session ID's - is something
wrong?

> It appears to create session ID's for every call to the web server.  
> Is this
> correct?

 From the documentation:

When Active4D Sends Session Cookies
Even though Active4D generates a session ID when a client accesses  
your site, it does not
create the session in memory or send a session cookie to the client  
unless when one of
the following happens:

- The On Session Start event handler is defined (it need not set any  
session data)
- A script sets some session data
- A script uses the session command to get a session iterator

Is one of those conditions true in your site?

Regards,

    Aparajita
    www.aparajitaworld.com

    "If you dare to fail, you are bound to succeed."
    - Sri Chinmoy   |   www.srichinmoy.org


_______________________________________________
Active4D-dev mailing list
Active4D-dev@...
http://mailman.aparajitaworld.com/mailman/listinfo/active4d-dev
Archives: http://mailman.aparajitaworld.com/archive/active4d-dev/

_______________________________________________
Active4D-dev mailing list
Active4D-dev@...
http://mailman.aparajitaworld.com/mailman/listinfo/active4d-dev
Archives: http://mailman.aparajitaworld.com/archive/active4d-dev/

Re: So many Internal Session ID's - is something wrong?

by David Ringsmuth :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I am surprised that so many internal session ID's are create...

-----Original Message-----
From: active4d-dev-bounces@...
[mailto:active4d-dev-bounces@...] On Behalf Of Aparajita
Fishman
Sent: Wednesday, July 02, 2008 5:41 PM
To: active4d-dev@...
Subject: Re: [Active4d-dev] So many Internal Session ID's - is something
wrong?

> It appears to create session ID's for every call to the web server.  
> Is this
> correct?

 From the documentation:

When Active4D Sends Session Cookies
Even though Active4D generates a session ID when a client accesses  
your site, it does not
create the session in memory or send a session cookie to the client  
unless when one of
the following happens:

- The On Session Start event handler is defined (it need not set any  
session data)
- A script sets some session data
- A script uses the session command to get a session iterator

Is one of those conditions true in your site?

Regards,

    Aparajita
    www.aparajitaworld.com

    "If you dare to fail, you are bound to succeed."
    - Sri Chinmoy   |   www.srichinmoy.org


_______________________________________________
Active4D-dev mailing list
Active4D-dev@...
http://mailman.aparajitaworld.com/mailman/listinfo/active4d-dev
Archives: http://mailman.aparajitaworld.com/archive/active4d-dev/

_______________________________________________
Active4D-dev mailing list
Active4D-dev@...
http://mailman.aparajitaworld.com/mailman/listinfo/active4d-dev
Archives: http://mailman.aparajitaworld.com/archive/active4d-dev/

Re: So many Internal Session ID's - is something wrong?

by aparajita :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

> I have an "On Session Start" handler.

Don't if you don't intend to start a session on every hit. Just move  
the code from On Session Start to a method in another library, and  
call that method only when you actually want to start a session.

I am going to add an option in v4.5 that will determine whether the  
presence of On Session Start automatically starts a session. It will  
default to false (the opposite of the current behavior).

Regards,

    Aparajita
    www.aparajitaworld.com

    "If you dare to fail, you are bound to succeed."
    - Sri Chinmoy   |   www.srichinmoy.org


_______________________________________________
Active4D-dev mailing list
Active4D-dev@...
http://mailman.aparajitaworld.com/mailman/listinfo/active4d-dev
Archives: http://mailman.aparajitaworld.com/archive/active4d-dev/

Re: So many Internal Session ID's - is something wrong?

by aparajita :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

> I am surprised that so many internal session ID's are create...

One for *every* new user that hits the site.

Regards,

    Aparajita
    www.aparajitaworld.com

    "If you dare to fail, you are bound to succeed."
    - Sri Chinmoy   |   www.srichinmoy.org


_______________________________________________
Active4D-dev mailing list
Active4D-dev@...
http://mailman.aparajitaworld.com/mailman/listinfo/active4d-dev
Archives: http://mailman.aparajitaworld.com/archive/active4d-dev/

Re: So many Internal Session ID's - is something wrong?

by Peter Jakobsson-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


On 3 Jul 2008, at 01:10, David Ringsmuth wrote:

> I am surprised that so many internal session ID's are create...

David -

As Aparajita says, the session is kicked of under certain very  
definite circumstances which you can easily control.

For example, a typical application of this is, say in an e-commerce  
situation, to have the session start only when the customer adds an  
item to their basket (so that you can track the basket contents  
between requests).

I wouldn't recommend using the timeout to keep your sessions to a  
minimum - better to simply not have them start in the first place  
which is easy to do by identifying which action is triggering the  
session (e.g. 'On Session Start' handler, 'set session variable' etc).

hth

Peter

_______________________________________________
Active4D-dev mailing list
Active4D-dev@...
http://mailman.aparajitaworld.com/mailman/listinfo/active4d-dev
Archives: http://mailman.aparajitaworld.com/archive/active4d-dev/
LightInTheBox - Buy quality products at wholesale price