httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From do...@osf.org (Doug MacEachern)
Subject Re: An idea for state saving
Date Thu, 30 May 1996 18:38:43 GMT
>I am not sure how mod_fastperl manages its memory, but mod_php uses
>Apache sub-pools.  These sub-pools are automatically cleared by Apache
>at the end of each request.  Being able to indicate that a sub-pool's
>life should span entire keep-alive sessions would be a valuable feature.
>A request record flag would probably need to be set to indicate that
>a persistant memory pool is active so the module knows that it is there.

mod_perl_fast (I kinda like mod_fastperl better), uses the apache sub-pools
to manage most of it's memory.  It uses the Perl routines perl_alloc and
perl_construct to allocate an interpreter when the server starts, along with
perl_free and perl_destruct to free the memory when the server is
re-started.  Everything else (memory for the perl scripts themselves) is
managed by perl internally.

There are some perl-related problems here that are being worked out.  In
short, perl_free and perl_destruct don't do everything they should, so with
mod_perl_fast, the server grows when it is re-started.

In terms of maintaining state, I have not tried anything session-based with
this module yet.  However, when the server starts it is possible to open a
persistent connection to a database (or some other system/network service),
each child gets copy of the database handle.  I do plan to look at ways of
maintaining state, and I am open to these and other ideas anyone else might
have.

-Doug

>-Rasmus
>
>


Mime
View raw message