Re: Apache2::SubProcess subprocess not subprocessing properly

Tosh Cooey <[email protected]>
Newsgroups gmane.comp.apache.mod-perl
Organization Twelve Hundred Group LLC
Message-ID <[email protected]>
Actually my solution to this problem was pretty rational.  I just turned 
mod_perl off for this particular program.

<Files ~ "(?<!myfork)\.pl$">
   PerlHandler ModPerl::Registry
</Files>

Will I a have possible performance problems?  Sure, but nothing a few 
more $25/month servers can't fix, and it saves me all the aggravation of 
the past months trying to get this to work.

Problem solved!

Tosh


Torsten Förtsch wrote:
> On Tuesday 09 February 2010 14:21:57 Tosh Cooey wrote:
>> use POSIX 'setsid';
> if( fork ) { POSIX::_exit 0; CORE::exit 0 }
>> chdir '/'                or die "Can't chdir to /: $!";
>>
> simplest is to fork() another time to break the parent-child relationship.
> 
> Keep in mind that you make your service vulnerable if you simply fork off long 
> running processes.
> 
> What prevents a user from testing it:
> 
>   ab -n 100000 -c 100 http://...
> 
> This will quite fast create a *lot* of processes.
> 
> I tend to use some kind of queue for such processing. But, of course, it 
> depends.
> 
> Torsten
> 

-- 
McIntosh Cooey - Twelve Hundred Group LLC - http://www.1200group.com/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.