Where to sys.setcheckinterval() for plone/zope? (was: Re: [Zope] Re: SMP and Zope.
Right, this does not however keep you from putting
import sys sys.setcheckinterval(1000)
someplace where it *does* get picked up...
For a normal plone site: Where would it get picked up? I added it to the beginning of $SOFTWARE_HOME/Zope/Startup/zopectl.py (the script called by "zopectl start"). However, the new checkinterval ist not passed on to the rest. Do I have to set this at the beginning of each script? Where would be a suitable place/file to add this setting? Jens PS Sorry for not keeping this mail in line with the thread, but I only found it via google and subscribe to zope-list afterwards.
Stefan
On 15. Mär 2005, at 17:48, Andrew Langmead wrote:
On Mar 15, 2005, at 11:31 AM, Stefan H. Holek wrote:
Rule of thumb is: checkinterval = pystones / 50
Before everyone goes adjusting their zope.conf's python-check-interval, I think I should point out that the configuration option is ignored in versions of Zope 2.7 previous to the Zope-2.7.5 beta release. In Zope 2.7.0 through 2.7.4, you are getting Python 2.3's default checkinterval of 100 no matter what
your
zope.conf file says.
On Mar 18, 2005, at 6:20 AM, Jens Nachtigall wrote:
For a normal plone site: Where would it get picked up? I added it to the beginning of $SOFTWARE_HOME/Zope/Startup/zopectl.py (the script called by "zopectl start"). However, the new checkinterval ist not passed on to the rest. Do I have to set this at the beginning of each script? Where would be a suitable place/file to add this setting?
There are a couple of ways I can think of. Instead of patching zopectl.py, change $SOFTWARE_HOME/Zope/Startup/run.py. The program zopectl.py spawns a new python process called run.py, and the interpreter's sys.setcheckinterval is not passed across processes. Another option would be to add the patch that went into 2.7.5. The same patch should work for any 2.7.x release so far. <http://www.zope.org/Collectors/Zope/1661> Another is to create a simple Zope Product that has sys.setcheckinterval(1000) within its initialization method. (See <http://www.zope.org/Members/gtk/Boring/HowTo-Boring> for the basics of creating a zope product.) Another would be to create a small external method and then execute that method with something like wget. Another would be to upgrade to 2.7.5, which was just released in its final form today.
Jens Nachtigall wrote:
For a normal plone site: Where would it get picked up? I added it to the beginning of $SOFTWARE_HOME/Zope/Startup/zopectl.py (the script called by "zopectl start"). However, the new checkinterval ist not passed on to the rest. Do I have to set this at the beginning of each script? Where would be a suitable place/file to add this setting?
Is there not a zope.conf option for configuring this? Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk
Jens Nachtigall wrote:
For a normal plone site: Where would it get picked up? I added it to the beginning of $SOFTWARE_HOME/Zope/Startup/zopectl.py (the script called by "zopectl start"). However, the new checkinterval ist not passed on to the rest. Do I have to set this at the beginning of each script? Where would be a suitable place/file to add this setting?
Is there not a zope.conf option for configuring this?
There is a bug in 2.7.x (only fixed in the newly released 2.7.5), which causes the entry in zope.conf not to be used :-( jens
participants (3)
-
Andrew Langmead -
Chris Withers -
Jens Nachtigall