Loading ...
Sorry, an error occurred while loading the content.

Session counting

Expand Messages
  • Bruno Czekay
    Hi I ve noticed strange behavior of Apache::ASP 2.57 - I mean session counting. In my Application I have code like this: //global.asa frag: sub Session_OnStart
    Message 1 of 1 , Feb 18, 2004
    • 0 Attachment
      Hi

      I've noticed strange behavior of Apache::ASP 2.57 - I mean session counting.

      In my Application I have code like this:

      //global.asa frag:

      sub Session_OnStart {
      ...
      $Application->{HowMany}++;
      $Application->{'Session'.$Session->SessionID} = "blah blah";
      ...
      }

      sub Session_OnEnd { delete $Application->{'Session'.$Session->SessionID}; }

      Then I've created some page, where Sessions are displayed. To get number of
      sessions I use $Application->SessionCount(), and then:

      for ( @sessions ) {
      next unless ( $_ =~ /^Session/ );
      my $s_id = $_;
      $s_id =~ s/^Session//io;
      my $session = $Application->GetSession( $s_id );
      my $s_data = $session ? { %$session } : undef;
      // display some contents of $s_data
      }

      The problem is, that $Application->SessionCount() returns less than number of
      displayed lines (one per session, of coz). I've noticed it happens after few
      hours of runnning Application - e.g. at the moment $Application->{HowMany} has
      value of 7075, $Application->SessionCount() returns 0, but I see 11 sessions
      (one is mine).

      Kudos for Josh - for A::ASP and providing good examples of using it.

      Regards

      --
      CPU hotplug is not for removing the processor from single-CPU x86 box.
      Kiddie: "The new kernel has CPU hotplug support, here, watch... oh CRAP."

      Bruno Czekay - bruno(at)domar.pl

      ---------------------------------------------------------------------
      To unsubscribe, e-mail: asp-unsubscribe@...
      For additional commands, e-mail: asp-help@...
    Your message has been successfully submitted and would be delivered to recipients shortly.