-----Original Message----- From: Anthony Baxter [mailto:anthony@interlink.com.au] Sent: Tuesday, November 30, 1999 5:02 PM To: Doug Hellmann Cc: Adam Gotheridge; zope Subject: Re: [Zope] server stopping
Can you address this by firing up more publishing threads?
It doesn't really matter past seven threads, you can fire up as many as you want but there is a hardwired limit on database connections, 7. -Michel
We had set our thread count to 200 (excessively large, but we were trying to figure out if having a high thread count would help) and saw no difference. The hardwired limit on the ZODB explains that. Is there any way to change the limit? Is that a Bad Thing to do? Is there something magic about the number 7? Doug Michel Pelletier wrote:
-----Original Message----- From: Anthony Baxter [mailto:anthony@interlink.com.au] Sent: Tuesday, November 30, 1999 5:02 PM To: Doug Hellmann Cc: Adam Gotheridge; zope Subject: Re: [Zope] server stopping
Can you address this by firing up more publishing threads?
It doesn't really matter past seven threads, you can fire up as many as you want but there is a hardwired limit on database connections, 7.
-Michel
_______________________________________________ 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 )
Doug Hellmann wrote:
We had set our thread count to 200 (excessively large, but we were trying to figure out if having a high thread count would help) and saw no difference. The hardwired limit on the ZODB explains that.
Is there any way to change the limit?
Sure, you can edit lib/python/ZODB/DB.py, :) at least for experimentation purposes. There isn't a knob for this now ....OK I just a crude one in. Zope looks for a module named "custom_zodb" in your instance home (usually the root of your Zope distribution). If it finds it, it tries to get the attribute 'Storage' from it. This allows you to use an alternate storage. I just checked in a change (to lib/python/Zope/__init__.py) that lets you define an attribute 'DB', which is an actual database instance. This allows you to set parameters for which there aren't higher-level controls. For example, to set the maximum number of (non-version) database connections to 20, create a custom_zodb.py file with: import Globals, ZODB, ZODB.FileStorage DB=ZODB.FileStorage.FileStorage(Globals.BobobaseName) DB=ZODB.DB(DB) DB._pool_size=20
Is that a Bad Thing to do?
No.
Is there something magic about the number 7?
No. Keep in mind that there is some overhead on connections: - Zope has to do some computation on connections to manage their caches. If there were a large number of conections, the overhead of this could, eventually, become costly. The cache management logic is mostly written in C, so this might not be very important. - Each database connection has it's own object cache. If you had a large number of very active connections, the memory footprint would be bigger than with a smaller number of connections. OTOH, caches of inactive connections tend to shrink over time. Jim -- Jim Fulton mailto:jim@digicool.com Technical Director (888) 344-4332 Python Powered! Digital Creations http://www.digicool.com http://www.python.org Under US Code Title 47, Sec.227(b)(1)(C), Sec.227(a)(2)(B) This email address may not be added to any commercial mail list with out my permission. Violation of my privacy with advertising or SPAM will result in a suit for a MINIMUM of $500 damages/incident, $1500 for repeats.
participants (3)
-
Doug Hellmann -
Jim Fulton -
Michel Pelletier