What it sounds like is that Python is using a "sequential" threading
model.  I don't know about Python in particular, but some languages
implement a sequential model internally so that multithreaded programs
will run correctly (if not effeciently) in the absense of whatever
thread libraries the language uses for normal threading.

As an aside, something I learned the hard way is that Python doesn't
thread very well.  The documentation talks a lot about threading, but in
most instances only one thread can run at a given time (it should still
swap between threads, though).  I never saw any benefit to increasing
z-server-threads beyond 4 -- all the extra threads are going to do is
consume memory.  If you need get real concurrency (for example to make
use of additional processors) you need to run multiple zope processes.
Kevin

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of
Jon Emmons
Sent: Friday, May 23, 2008 8:10 AM
To: 'Jaroslav Lukesh'; zope@zope.org
Subject: RE: [Zope] Multithreading sessions

Jaroslav and everyone,

I have made the changes Jaroslav suggested and I cannot get Zope to
serve even 2 sessions simultaneously.

In our testing, one client will start a query to the data servers.
Another will try to simply get the logon page to be served.  Zope will
simply sit there and wait until the DB returns its results for the first
user before doing anything at all for the second.  The 2nd user is not
hitting the DB server.  The python script accessing the data is waiting
for the results for the first user.  Could python be the problem?

I am running python 2.4.4.

Is it possible that I missed a flag or something when I build the Zope?

Thanks for your suggestions so far, but I think I have missed a
fundamental setup step that allows zope to multithread sessions.

If I were echoing what was being served to the clients, shouldn't I see
it interwoven?  I don't, it is always (client 1's results) then (client
2's results)... very atomic.

Thanks again,

Jon Emmons



-----Original Message-----
From: Jaroslav Lukesh [mailto:[EMAIL PROTECTED]
Sent: Friday, May 23, 2008 9:37 AM
To: Jon Emmons; zope@zope.org
Subject: Re: [Zope] Multithreading sessions

Hi Jon,

I use 24 zserver-threads and I have here defined number of ZoDB
connections
(pool-size):

in your instance etc/zope.conf look for that section:

<zodb_db main>
    # Main FileStorage database
    <filestorage>
      path $INSTANCE/var/Data.fs
    </filestorage>
    mount-point /
    cache-size 1000
    pool-size 24
</zodb_db>

Please pay attention, if you have bunch of cache, your RAM shoul be
exhausted.

Regards, JL.

----- Original Message -----
From: "Jon Emmons" <[EMAIL PROTECTED]>


> I had already gone into zope.conf and added the line:
>
> zserver-threads 10
>
> This seemed to have no effect.  Is that what you mean?
> You think I should bump it higher?  100 maybe?

_______________________________________________
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )
_______________________________________________
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )

Reply via email to