> Still seeking assistance form anyone who is experienced with sockets and
> mod-perl /apache on NT.

No NT here, but...

> Anyway, as my previous email showed, I built a site which used a global
> filehandle to a socket. It worked great for about two hours, and then all
of
> a sudden stopped. After rebooting the apache server, all worked well
again.
>
> I am thinking that the cached code probably went away since no one hit it
> for a while? Does apache give back cached scripts after a certain time of
> not being used?

Not exactly.  An apache child process will eventually die if there's nothing
to keep it busy, but at least one process will always remain, and on Windows
there is always exactly one at any given time (with mod_perl).  If you're
using MaxRequestsPerChild or Apache::SizeLimit or something similar, the
process will eventually be killed and a new one will take it's place,
meaning that code cached during startup.pl/httpd.conf will still be cached
but anything cached in that child will be gone.

You probably don't want to try and change this behavior, since it keeps
processes from growing too large.  However, you should make sure that you
aren't trying to open a socket (or filehandle, or database handle) in the
parent process (during startup) and use it in the children.  Each child will
have to make a new socket the first time.

Hope that helps,
Perrin

Reply via email to