httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nick Kew <>
Subject Re: [users@httpd] Threaded MPM + mod_php/mod_python/mod_perl/mod_ruby.. thread safe?
Date Wed, 11 Feb 2009 17:49:13 GMT
On Thu, 12 Feb 2009 00:08:08 +0800
howard chen <> wrote:

> But I just wonder, isn't all mod_php/mod_python/mod_perl/mod_ruby are
> relying on the same set of popular 3rd party libraries? e.g. zlib,
> libxml, expat, the above statement is also true in
> mod_python/mod_perl/mod_ruby?

There are relatively few libraries that are positively not thread-safe
(some elderly graphics stuff like libjpeg springs to mind).

However, there are many libraries that can be made non-thread-safe
by sloppy programming in applications that use them.  I think they
must've fixed it by now, but PHP+libxml2 a few years ago was
notoriously *much* worse than just non-thread-safe: it could foul
up *any* non-PHP application that uses the lib, by *globally*
installing its own error handlers.  So, other module hits a parse
error, php's handler gets invoked but is uninitialised - SEGFAULT!

> So it turn out that Threaded MPM is only suitable for serving static
> pages?

Nope.  Plenty of dynamic apps work with threaded MPMs.  With or
without perl/python/ruby/whatever.

Nick Kew

Application Development with Apache - the Apache Modules Book

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message