Jeremy Howard wrote:
> 
> * fork(): Memory hog, since it copies the entire Apache process (is this
> right--does it share the memory for all the modules etc...?)

Assuming you're on a modern Unixish system, it shouldn't be bad at all if
you don't change too many variables and if the child doesn't often live long
enough for the parent to change too many (due to the memory sharing you list
below).  A bit of testing might be in order to see how hard it affects you.

> * system(): Slow--would have to start up a new Perl process

system() does a fork/exec under the hood.

> * Create a simple preforking server and have mod_perl just pass a request
> to it through a socket: Seems like overkill.
> 
> The most hopeful possibility seems to be fork(), but the Guide says to
> avoid it. Isn't almost all the memory shared though?

Yup.

> The other place I'd like to avoid holding up my mod_perl processes is in
> waiting for file uploads to finish (which is a common situation as people
> upload attachments for their emails). Is there a any way to do this...
> perhaps by using some kind of 'gateway' server?

The most often wished-for approach is for a http cache to accept the whole
request before passing it through to the main httpd, but I'm not aware of
any that do that.

- Barrie

Reply via email to