httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nick Kew <n...@webthing.com>
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 <howachen@gmail.com> 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, iconv....so 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
http://www.apachetutor.org/

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message