You are viewing a plain text version of this content. The canonical link for it is here.
Posted to asp@perl.apache.org by "John D. Leonard II" <jo...@ce.gatech.edu> on 2001/06/27 19:41:43 UTC

Restarting Application

Is there a method to clear out and restart an application?  I've tried
restarting httpd, but yes, the application state is persistent across httpd
restarts.

Thanks,

JL
------
John D. Leonard II, Associate Professor            Phone: 404/894-2360
School of Civil and Environmental Engineering       FAX:  404/894-2278
Georgia Institute of Technology           http://traffic.ce.gatech.edu
Atlanta, GA  30332-0355              mailto:john.leonard@ce.gatech.edu


---------------------------------------------------------------------
To unsubscribe, e-mail: asp-unsubscribe@perl.apache.org
For additional commands, e-mail: asp-help@perl.apache.org


Re: Session->{TimeTillDeath} or Session->{TimeToDie}?

Posted by Joshua Chamas <jo...@chamas.com>.
"John D. Leonard II" wrote:
> 
> Joshua:
> 
> Is there any way to access the amount of time left for a particular session?
> 
> I realize that I do it myself by storing the time that the last script was
> executed into $Session during Script_OnStart, but was wondering if
> Apache::ASP tracked this information with the $Session itself.
> 
> I'm playing around with the ASP model for watching who is currently active
> within an application. I currently track the number of active sessions,
> their last used IP address (from $Request->ServerVariables), and the number
> of scripts accessed.  See:  http://traffic.ce.gatech.edu/
> 

There is no API for this, so the way you are doing it is
probably best.  Note that if you are storing big data per key
in $Session or $Application, then you'll want to switch to 
MLDBM::Sync::SDBM_File or DB_File for you StateDB, to
avoid the key/value 1024 byte limit on SDBM_File.

-- Josh
_________________________________________________________________
Joshua Chamas                           Chamas Enterprises Inc.
NodeWorks <- Web Link Checking          Huntington Beach, CA  USA 
http://www.nodeworks.com                1-714-625-4051

---------------------------------------------------------------------
To unsubscribe, e-mail: asp-unsubscribe@perl.apache.org
For additional commands, e-mail: asp-help@perl.apache.org


Session->{TimeTillDeath} or Session->{TimeToDie}?

Posted by "John D. Leonard II" <jo...@ce.gatech.edu>.
Joshua:

Is there any way to access the amount of time left for a particular session?

I realize that I do it myself by storing the time that the last script was
executed into $Session during Script_OnStart, but was wondering if
Apache::ASP tracked this information with the $Session itself.

I'm playing around with the ASP model for watching who is currently active
within an application. I currently track the number of active sessions,
their last used IP address (from $Request->ServerVariables), and the number
of scripts accessed.  See:  http://traffic.ce.gatech.edu/

Thanks,

JL


---------------------------------------------------------------------
To unsubscribe, e-mail: asp-unsubscribe@perl.apache.org
For additional commands, e-mail: asp-help@perl.apache.org


Re: Restarting Application

Posted by Joshua Chamas <jo...@chamas.com>.
"John D. Leonard II" wrote:
> 
> Is there a method to clear out and restart an application?  I've tried
> restarting httpd, but yes, the application state is persistent across httpd
> restarts.
> 

delete data in StateDir, like:

  \rm -rf /tmp/my_apps_state_dir/*

Doing this while your web server is down is the safest
way to approach this.

Technically, the application state will be purged whenever
your last session times out, so you could also wait for
SessionTimeout of web server inactivity which defaults 
to 20 minutes.  Set SessionTimeout real low while developing,
and you can purge $Application state that way too.

--Josh

_________________________________________________________________
Joshua Chamas                           Chamas Enterprises Inc.
NodeWorks <- Web Link Checking          Huntington Beach, CA  USA 
http://www.nodeworks.com                1-714-625-4051

---------------------------------------------------------------------
To unsubscribe, e-mail: asp-unsubscribe@perl.apache.org
For additional commands, e-mail: asp-help@perl.apache.org