Re: [suPHP] MPM: Worker or Prefork ?

2008-07-24 Thread Dan Mahoney, System Admin
On Thu, 24 Jul 2008, Fili wrote:

Here's my take on it -- others are welcome to comment or agree/disagree.

The PHP documentation heavily warns that you should not use PHP on a 
multi-threaded web-server because (and I quote) "php is glue" and it's not 
a guarantee that all the things that it's gluing together are threadsafe.

I still run apache 1.3 because apache 2.0 has been known to be more 
bloated, I've had constant compile issues with it (with it building .la 
files instead of .so, with APR looking (and failing) for ITSELF on my 
system and vomiting), and a lack of other module support that I (in a 
hosting environment) cannot do without (for example, mod_frontpage).

Since I build my apache with --enable-shared=max, I took the opportunity 
recently to trim down the number of shared modules I'm loading and don't 
need -- this saved me something in terms of process (I can post the list 
if interested).

However, my thought is this:

Since suPHP is already going to spin off a separate process space for the 
PHP-CGI, this negates the potential harm from PHP+threads.

-Dan

-- 

"SOY BOMB!"

-The Chest of the nameless streaker of the 1998 Grammy Awards' Bob Dylan
Performance.

Dan Mahoney
Techie,  Sysadmin,  WebGeek
Gushi on efnet/undernet IRC
ICQ: 13735144   AIM: LarpGM
Site:  http://www.gushi.org
---


___
suPHP mailing list
suPHP@lists.marsching.biz
http://lists.marsching.com/mailman/listinfo/suphp


Re: [suPHP] MPM: Worker or Prefork ?

2008-07-25 Thread Fili
Dan Mahoney, System Admin wrote:
> However, my thought is this:
>
> Since suPHP is already going to spin off a separate process space for 
> the PHP-CGI, this negates the potential harm from PHP+threads.
>
> -Dan
>

This is what I assumed to be true aswell, but alas there is no
documentation which confirms it.
I would have expected it on this page: http://suphp.org/FAQ.html

Does anybody have bad experiences with suPHP + mpm-worker?
Regards,

Fili





___
suPHP mailing list
suPHP@lists.marsching.biz
http://lists.marsching.com/mailman/listinfo/suphp


Re: [suPHP] MPM: Worker or Prefork ?

2008-07-25 Thread Jeremy Chadwick
Yes, there are numerous posts on this list in the past describing
problems with mpm-worker and PHP.  suPHP does not appear to be
responsible for the issues, although one individual did find a signal
masking issue which may be specific to suPHP.

-- 
| Jeremy Chadwickjdc at parodius.com |
| Parodius Networking   http://www.parodius.com/ |
| UNIX Systems Administrator  Mountain View, CA, USA |
| Making life hard for others since 1977.  PGP: 4BD6C0CB |

On Fri, Jul 25, 2008 at 11:39:32AM +0200, Fili wrote:
> Dan Mahoney, System Admin wrote:
> > However, my thought is this:
> >
> > Since suPHP is already going to spin off a separate process space for 
> > the PHP-CGI, this negates the potential harm from PHP+threads.
> >
> > -Dan
> >
> 
> This is what I assumed to be true aswell, but alas there is no
> documentation which confirms it.
> I would have expected it on this page: http://suphp.org/FAQ.html
> 
> Does anybody have bad experiences with suPHP + mpm-worker?
> Regards,
> 
> Fili
> 
> 
> 
> 
> 
> ___
> suPHP mailing list
> suPHP@lists.marsching.biz
> http://lists.marsching.com/mailman/listinfo/suphp
> 

___
suPHP mailing list
suPHP@lists.marsching.biz
http://lists.marsching.com/mailman/listinfo/suphp


Re: [suPHP] MPM: Worker or Prefork ?

2008-07-25 Thread Fili
Jeremy Chadwick wrote:
> Yes, there are numerous posts on this list in the past describing
> problems with mpm-worker and PHP.  suPHP does not appear to be
> responsible for the issues, although one individual did find a signal
> masking issue which may be specific to suPHP.
>
>   

Thanks for your reply.
I've read both threads you're referring to, however there doesn't seem 
to be a conclusive yes/no.
The few things I can find about the subject is contradicting.

Maybe nobody knows if suPHP is threading safe.
It seems to me as an important question though.

Fili


___
suPHP mailing list
suPHP@lists.marsching.biz
http://lists.marsching.com/mailman/listinfo/suphp


Re: [suPHP] MPM: Worker or Prefork ?

2008-07-25 Thread Jeremy Chadwick
This is more of a question for Sebastian (the author) than the rest of
us, though mailing the list is indeed the right thing to do.

I'm under the impression that Sebastian doesn't test suPHP on systems
using a threaded MPM, but tests it under systems using the prefork MPM.

Regardless of what people think, threading on UNIX is still fairly new
as far as general application adoption goes.  Sure, Solaris's threading
model is fast and rock-solid, but as I'm sure you know, the number of
threaded applications is fairly low (compared to fork) on UNIX.

Also, you have to ask yourself: is switching to a threaded MPM *really*
something you want to do on a hosting environment?  Historically hosting
environments have CGIs and other scripted languages that were written
purely with the forked environment in mind (e.g. classic Apache 1.3 or
older).  I am very well aware of the benefits of threads, but I often
wonder why someone would consider that model for a hosting environment.
It's still too new of a technology, IMHO.

-- 
| Jeremy Chadwickjdc at parodius.com |
| Parodius Networking   http://www.parodius.com/ |
| UNIX Systems Administrator  Mountain View, CA, USA |
| Making life hard for others since 1977.  PGP: 4BD6C0CB |

On Fri, Jul 25, 2008 at 12:36:24PM +0200, Fili wrote:
> Jeremy Chadwick wrote:
> > Yes, there are numerous posts on this list in the past describing
> > problems with mpm-worker and PHP.  suPHP does not appear to be
> > responsible for the issues, although one individual did find a signal
> > masking issue which may be specific to suPHP.
> >
> >   
> 
> Thanks for your reply.
> I've read both threads you're referring to, however there doesn't seem 
> to be a conclusive yes/no.
> The few things I can find about the subject is contradicting.
> 
> Maybe nobody knows if suPHP is threading safe.
> It seems to me as an important question though.
> 
> Fili
> 
> 
> ___
> suPHP mailing list
> suPHP@lists.marsching.biz
> http://lists.marsching.com/mailman/listinfo/suphp
> 

___
suPHP mailing list
suPHP@lists.marsching.biz
http://lists.marsching.com/mailman/listinfo/suphp


Re: [suPHP] MPM: Worker or Prefork ?

2008-07-25 Thread Fili
Jeremy Chadwick wrote:
> This is more of a question for Sebastian (the author) than the rest of
> us, though mailing the list is indeed the right thing to do.
>
> I'm under the impression that Sebastian doesn't test suPHP on systems
> using a threaded MPM, but tests it under systems using the prefork MPM.
>
> Regardless of what people think, threading on UNIX is still fairly new
> as far as general application adoption goes.  Sure, Solaris's threading
> model is fast and rock-solid, but as I'm sure you know, the number of
> threaded applications is fairly low (compared to fork) on UNIX.
>
> Also, you have to ask yourself: is switching to a threaded MPM *really*
> something you want to do on a hosting environment?  Historically hosting
> environments have CGIs and other scripted languages that were written
> purely with the forked environment in mind (e.g. classic Apache 1.3 or
> older).  I am very well aware of the benefits of threads, but I often
> wonder why someone would consider that model for a hosting environment.
> It's still too new of a technology, IMHO.
>
>   

I thought a moment of what you said and can't but agree.
It is wiser, for now, to go for the safer prefork-model.

Thanks for your input,
Fili


___
suPHP mailing list
suPHP@lists.marsching.biz
http://lists.marsching.com/mailman/listinfo/suphp


Re: [suPHP] MPM: Worker or Prefork ?

2008-07-25 Thread Cedric Veilleux
Hi,

To my understanding, suPHP executes a normal php-cgi under dropped
privileges using a wrapper.

In such a scenario, I really don't see why a threaded ou non-threaded
web server would matter: PHP is running as cgi in its on process space.

I have been using suPHP under the worker mpm for 3 months on debian etch
on a hosting server. I am using only debian packages (apache, suphp,
php). It works great.

In the past I have used suPHP with prefork mpm under debian sarge. It
also worked fine.


Regards,

Cedric




Le vendredi 25 juillet 2008 à 12:36 +0200, Fili a écrit :
> Jeremy Chadwick wrote:
> > Yes, there are numerous posts on this list in the past describing
> > problems with mpm-worker and PHP.  suPHP does not appear to be
> > responsible for the issues, although one individual did find a signal
> > masking issue which may be specific to suPHP.
> >
> >   
> 
> Thanks for your reply.
> I've read both threads you're referring to, however there doesn't seem 
> to be a conclusive yes/no.
> The few things I can find about the subject is contradicting.
> 
> Maybe nobody knows if suPHP is threading safe.
> It seems to me as an important question though.
> 
> Fili
> 
> 
> ___
> suPHP mailing list
> suPHP@lists.marsching.biz
> http://lists.marsching.com/mailman/listinfo/suphp


smime.p7s
Description: S/MIME cryptographic signature
___
suPHP mailing list
suPHP@lists.marsching.biz
http://lists.marsching.com/mailman/listinfo/suphp


Re: [suPHP] MPM: Worker or Prefork ?

2008-07-25 Thread Sebastian Marsching

Hi,

Jeremy Chadwick schrieb:

This is more of a question for Sebastian (the author) than the rest of
us, though mailing the list is indeed the right thing to do.

I'm under the impression that Sebastian doesn't test suPHP on systems
using a threaded MPM, but tests it under systems using the prefork MPM.


I have been flawlessly running my webserver with suPHP and worker MPM 
for at least several months (probably much longer, but I moved the 
system some months ago and cannot remember for sure, which MPM was 
running on the old one).


suPHP itself should be thread-safe as it does not share any data between 
requests. Configuration data is shared, but this should not be a 
problem, because as far as request processing is concerned, this is 
read-only.


On the other hand you are right that multi-threading in Apache is rather 
new and thread-safety is a difficult topic. So as long as MPM prefork is 
working and the server is not running at the edge of its capabilities, 
there is no need for MPM worker.


Regarding the signal / zombies issue discussed some month ago, in fact 
MPM worker could be causing this problems. At least as far as I have 
investigated this issue, probably mod_suphp is not causing this issues: 
The way suPHP is creating a new process, is exactly the same ways other 
modules are using and the APR API reference does not say anything about 
signal handlers, so probably Apache or APR should take care of this. 
Besides a module could not even change the signal mask without affecting 
the whole server, so doing something like this in a module is probably a 
very bad idea.


On my server this problem never occurred, though I am using MPM worker. 
It seems like this issue only occurs under very special circumstances, 
thus finding the real cause might be very difficult.



- Sebastian



smime.p7s
Description: S/MIME Cryptographic Signature
___
suPHP mailing list
suPHP@lists.marsching.biz
http://lists.marsching.com/mailman/listinfo/suphp