[Zope] Help ...........Desperate
Marcus Collins
mcollins@sunesi.com
Thu, 30 Mar 2000 11:17:01 +0200
[exec. summary -- concurrent requests becoming serialised; suggestions]
Hi,
I ran your test script on our zope server, and managed to view many other
pages while zope was parsing the page...
It looks like you might not have enough available threads (or maybe database
connections?).
It's strange that only one request at a time is processed -- are you perhaps
using Zope in single-threaded mode (using pcgi_publisher; see
doc/WEBSERVER.txt for details)? You can set the number of threads Zope uses
by changing NUMBER_OF_THREADS in Zope.cgi; the default is 4. Note that
increasing this number will also increase Zope's memory footprint, as each
thread gets its own copy of the persistent object space.
It may also be that your machine is simply choking on that test script -- it
takes a while for zope to parse and render it. Despite python switching
between threads every n bytecodes, such a script (rendering one million
items) is going to put quite a load on the machine!
On your database queries you may be using a database adaptor that doesn't
give up the global python interpreter lock during transactions. This
prevents other threads from executing. What database and database adaptor
version are you using? See http://www.zope.org/Members/petrilli/DARoadmap
for details. There is a brief description of why the interpreter lock exists
in the python FAQ, section 4.88 (http://www.python.org/doc/FAQ.html#4.88).
Although unlikely with only one user, it's also possible that you could be
running out of database connections. By default, a maximum of seven
connections can be opened to any database you add. This limit can be set by
adjusting pool_size in zope_dir/lib/pyhthon/ZODB/DB.py (later versions of
Zope allow you to tweak these things in a custom_zodb.py file; try searching
the mailing list for details). Note that increasing pool_size will again
increase Zope's memory footprint, as query results are cached on a
per-connection basis.
hth,
-- Marcus
> -----Original Message-----
> From: Daniel G. Rusch [mailto:drusch@globalcrossing.com]
> Sent: 29 March 2000 22:45
> To: zope@zope.org
> Subject: [Zope] Help ...........Desperate
>
>
> Help very desperate....
>
>
> We have a Zope site running:
> Zope version: Zope 2.0.1 (source release, python 1.5.1, linux2)
> (also happens on a seperate box running Zope 2.1.6)
> Python version: 1.5.2 (#6, Sep 22 1999, 10:32:58) [GCC 2.8.1]
> System Platform: sunos5, Ultra-2
>
> It seems that if a user hits a page that either does an
> intense database
> query or iterates over a large number of items, all other users are
> prevented from accessing any page....! This problem may to be
> related to
> the dtml-in but we are not sure.
>
> For example suppose user A hits the following page (before user B hits
> his page):
> <!--#var standard_html_header-->
> <dtml-in "_.range(999)">
> <dtml-var "_['sequence-item']">
> <dtml-in "_.range(999)">
> <dtml-var "_['sequence-item']">
> </dtml-in>
> </dtml-in>
> <!--#var standard_html_footer-->
>
> And User B tries to access this page:
> <html><head>
> </head>
> <body>
> This is test
> </body>
> </html>
>
> User B is prevented from accessing his page until User A's
> page returns.
>
> Please help ASAP
>
> Dan
>
> _______________________________________________
> Zope maillist - Zope@zope.org
> http://lists.zope.org/mailman/listinfo/zope
> ** No cross posts or HTML encoding! **
> (Related lists -
> http://lists.zope.org/mailman/listinfo/zope-announce
> http://lists.zope.org/mailman/listinfo/zope-dev )
>