On Mon, 30 Apr 2001, Brian Foddy wrote:
> Perhaps another possible solution is this...
> For those 1 in 300 web hits that the developer knows is
> going to use gobs of memory and assuming they can't
> be re-engineered to use less (through temp files, etc),
> create a simple function that is callable in PHP that
> will cause the parent apache process to exit (if it doesn't
> exist already) It will be immediately replaced by another much smaller
> version ready to handle the remaining 299 web hits.
// expesive memory processing ....
posix_kill (posix_getpid(), 15) || posix_kill (posix_getpid(), 9);
eventually, in a auto_apend file, if all the scripts are eating much mem.
IIRC, Posix support is compiled by default, so it looks like a nice
workarround for the memory problem...
I was wondering, could a SIGHUP to the current child make it to release
the memory? TERM is a bit harsh.
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]