[Zope] Multiple threads using Apache Rewrite

Matt Hamilton matth at netsight.co.uk
Thu Jan 8 09:09:16 EST 2004


On Thu, 2004-01-08 at 13:59, jim at jaydublu.com wrote:

> Running ps -aux only ever shows two Zope processes, no matter how hard
> one is working. Isn't there supposed to be a monitor process running
> which forks new processes when existing ones get busy, like Apache
> does?

Jim,
  No the monitor process does not spawn additional processes/threads, it
just makes sure that Zope is still running.  Zope internally uses python
threads (mixed with an event loop in asyncore.py) to handle requests.

We also run FreeBSD and have noticed some threading issues recently.  I
did a study about a year ago into Solaris threading issues an Zope and
was comparing it to FreeBSD.  At the time the threading was definately
working on FreeBSD.  Since then though we have upgraded Zope (2.3.x ->
2.6.2), python (1.5.2 -> 2.1.3), and FreeBSD (4.x to 4.9-STABLE) and
added ZEO and DirectoryStorage into the mix, so I don't know when and
what has broken it! :(

I have tried replicating the setup, but with python 2.3.3 and Zope 2.7.x
and at first experienced the same problems, but on a second try they
seemed to go away.  The main symptom was if you did a long running I/O
intensive task (reads, not writes) such as doing a Zope Find on a large
ZODB then all other threads would hang.

In the end I have worked around it by recompiling python 2.1.3 with
LinuxThreads support (look at the README in the LinuxThreads port) and
it has been running fine now for a few months.

-Matt

-- 
Matt Hamilton                                         matth at netsight.co.uk
Netsight Internet Solutions, Ltd.          Business Vision on the Internet
http://www.netsight.co.uk                               +44 (0)117 9090901
Web Hosting | Web Design  | Domain Names  |  Co-location  | DB Integration





More information about the Zope mailing list