[Zope] Zope woes continue - server going down regularly. (possible solution)
Cayce Ullman
c_ullman@yahoo.com
Wed, 8 Dec 1999 08:26:25 -0800 (PST)
>>> Alternatively, the server just hangs and doesn't
respond
>>> (but ps -aux shows the process is running).
>>
>>Is it spinning? (consuming 100% CPU resources?) or
hung? (consuming
>>none..)
I noticed a couple of weeks ago that my Zope,
started spinning when I hit a certain page 5 or
6 times. I noticed that this page was different
from the others as it tried to do a Zope.app().
This was interesting cause the actual Zope.app()
call worked, except it would eventually hose the
server. I figured I was just doing something wrong
and figured out another way to do it. Anyway,
here's how to reproduce the problem :
Create a external method that looks like this :
import Zope
def helloworld(self):
x = Zope.app()
return "Hello World"
---------
If you call that external method 5 or 6 times it
will crash your Zope.
Also, if you attempt to do this inside a Python
product it will have the same effect.
Chas, my suggestion to do you is search
all of your external methods and all of your 3rd
party python products for anyone importing Zope.
Just an aside, for those of you who don't know,
the reason anyone would want to do an import Zope,
Zope.app() inside an external method is that allows
you to get at other objects in your site without
explicitly having to pass them in. I assume that
isn't supposed to be done, and Zope.app() is for
debugging only.
Cayce
__________________________________________________
Do You Yahoo!?
Thousands of Stores. Millions of Products. All in one place.
Yahoo! Shopping: http://shopping.yahoo.com