Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 21 Sep 2010 16:03:16 +0700
From:      Victor Sudakov <sudakov@sibptus.tomsk.ru>
To:        freebsd-questions@freebsd.org
Subject:   Re: apache22 and threads
Message-ID:  <20100921090316.GA36655@admin.sibptus.tomsk.ru>
In-Reply-To: <i77jch$cee$1@dough.gmane.org>
References:  <20100920060811.GA10084@admin.sibptus.tomsk.ru> <i77jch$cee$1@dough.gmane.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Michael Powell wrote:
> > 
> > When building apache22 from ports, would you recommend to enable or to
> > disable threads support?
> > 
> > Even more confusing is the fact that for ports/www/apache22 the default
> > is: "Enable threads support in APR is off" (WITHOUT_THREADS=true)
> > 
> > while for ports/devel/apr1 the default is:
> > "Enable Threads in apr is on" (WITH_THREADS=true).
> > 
> > Thank you in advance for any input.
> > 
> > PS ports/devel/apr1 will also be used for the subversion client.
> > 
> 
> I wouldn't mind someone with more apache22-fu to elaborate, correcting the 
> following if necessary.
> 
> My thoughts are this matters depending upon which mpm you choose to build 
> into apache. The default is prefork, and it handles incoming requests by 
> spawning child processes. 

Do you mean to say "WITH_MPM=prefork" works exactly like apache13? 

[dd]

> 
> An additional consideration might be what kind of backend is used. For 
> example, since not all of PHP is known to be thread safe it is not 
> recommended for use with a threaded server and mod_php. The way to get 
> around this situation is to separate PHP from Apache with something like 
> mod_fcgid which runs PHP as a FastCGI. This way you can safely run a 
> threaded Apache with non-thread safe PHP. As far as which is the better 
> approach I still am not really sure. Each has its set of pros and cons.

 From what you have written it seems that prefork and no threads 
is the robustest, most reliable configuration (even if more resource
consuming)? 

-- 
Victor Sudakov,  VAS4-RIPE, VAS47-RIPN
sip:sudakov@sibptus.tomsk.ru



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20100921090316.GA36655>