Thank you all - 

 - sorry, I ask the question and then I've been away for a couple of
days - blush..

The process is usually from half to 3 minutes - so the cleanup handler
seems like a great idea - then, there are instances where it's much much
longer, but in these cases it's probably easier to write a little script
to do the job and stay away from apache - the code should know roughly
how long it's going to take when it starts, because it can look at how
long it took last time..  I think I will go with the cleanup handler as
my first attempt, it's unlikely more than a couple of processes will be
busy with this job at anyone time, and there are 50 sitting there so.. .
And then have a go at forking for the longer jobs.

Thank you all :-)

J.

> -----Original Message-----
> From: Cees Hek [mailto:[EMAIL PROTECTED] 
> Sent: 06 December 2003 05:36
> To: Stas Bekman
> Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> Subject: Re: Jumping out of Apache/mod_perl..
> 
> 
> Stas Bekman wrote:
> > Cees Hek wrote:
> > 
> >> Using fork is expensive.  It will use up as much memory as the 
> >> current
> >> child is already using, so you might as well just use the current 
> >> child to finished the processing.
> > 
> > That will work only if you care to wait for all processes to finish
> > untill you can restart apache. forking and detaching the 
> process allows 
> > you shutdown your httpd servers without affecting your long 
> term processes.
> 
> I guess it depends on how long the process is going to take.  
> I should 
> have mentioned that I would only use this for something that 
> is going to 
> run for a few minutes.  Long enough for a user to get anoyed and be 
> tempted to press stop or refresh in the browser.
> 
> If it is truely a long term process, then it will definately 
> be better 
> to fork (or to use the other suggestion of a daemon process 
> looking for 
> new work in a specified location)
> 
> Cheers,
> 
> Cees
> 
> 
> -- 
> Reporting bugs: http://perl.apache.org/bugs/
> Mail list info: http://perl.apache.org/maillist/modperl.html
> 
> ---
> Incoming mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.515 / Virus Database: 313 - Release Date: 01/09/2003
>  
> 


-- 
Reporting bugs: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html

Reply via email to