At 04:33 PM 8/12/99 -0500, you wrote:
A number of folks have posted about Zope lock up issues. It is very important to me to resolve this issues.
When ZServer occasionally locks up for me, it usually because I did something that's causing the publishing process to hang. This happens when you are coding external methods or Python products and make certain kinds of mistakes that put Zope in a loop.
I finally tracked down my problem. Some of the python code that I have written was falling into an infinite loop, and it had nothing to do with Zope. Of course, given how cool we all agree that Zope is, shouldn't it prevent these stupid programming problems :-)
Ahh, if only Python could read our minds. I guess we could think about some kind of publishing request time out. Hmm. This sounds ugly... At any rate we could fix ZServer so that if it couldn't get a request serviced in a certain amount of time it would return an appropriate error (408?) instead of just waiting forever...
One question, though. Since ZServer is multithreaded, should just the thread that is handling the python code that falls into the loop get stuck? Shouldn't the other threads keep on working? Or does the one thread simply consume all of the available cycles?
Usually it takes five requests to hang ZServer ;-) By default Zope uses 4 publishing threads. Each time you request a URL that put Zope in an infinite loop, there goes one more publishing thread. So after 4 evil requests you're locked up. -Amos