Crazy Problem With Having to Restart Zope Won't Go Away!
Hi; For some reason, from what I can judge a bug in the source code that affects some unfortunate ones such as myself, ZServer crashes every few hours and has to be re-started. So I wrote this script:
#!/bin/sh while : # if there's a page there, copy it to a test file do `wget -q -t 3 -T 30 http://thewebsons.com:8080/index_html -O test` # if there's something in the test file, go take a nap if grep '^<' test then sleep 60 # whoops! Why the heck does RH6.2 complain there's no ./start file?? Sometimes it complains, sometimes not. Hmmm... else if ./start then ./start & sleep 60 else sleep 10 fi fi done <<< and just let the fool thing run (in the Zope installation). But now I get error messages stating ./start doesn't exist! That's why the *else if* stuff, but it _still isn't good enough! Come back hours later and Zope's dead as a doornail. Furthermore, my script's not running, either. I don't get it! What am I not seeing? TIA, BenO
For some reason, from what I can judge a bug in the source code that affects some unfortunate ones such as myself, ZServer crashes every few hours and has to be re-started. So I wrote this script:
What file is this bug in? What line number?
At 03:14 PM 5/14/2001 -0500, you wrote:
For some reason, from what I can judge a bug in the source code that affects some unfortunate ones such as myself, ZServer crashes every few hours and has to be re-started. So I wrote this script:
What file is this bug in? What line number?
I don't know. All I know is that from the discussion on this list last week, I discovered *several* people have had a problem with the ZServer quitting for no apparent reason since the early days of Zope. Now, that sounds like a bug to me. So I've come up with a work-around. You seem like you know programming and Zope better than I. Would you mind helping me? Here's my question: For some reason, ZServer crashes every few hours and has to be re-started. So I wrote this script:
#!/bin/sh while : # if there's a page there, copy it to a test file do `wget -q -t 3 -T 30 http://thewebsons.com:8080/index_html -O test` # if there's something in the test file, go take a nap if grep '^<' test then sleep 60 # whoops! Why the heck does RH6.2 complain there's no ./start file?? Sometimes it complains, sometimes not. Hmmm... else if ./start then ./start & sleep 60 else sleep 10 fi fi done <<< and just let the fool thing run (in the Zope installation). But now I get error messages stating ./start doesn't exist! That's why the *else if* stuff, but it _still isn't good enough! Come back hours later and Zope's dead as a doornail. Furthermore, my script's not running, either. I don't get it! What am I not seeing? TIA, BenO P.S. If there were a way to keep my ZServer from crashing *without* this script, sure would like to know what it is...
have you tried including the full path to the start script? if it's outside of the normal path for the user the script runs as, it won't be found unless you execute a "cd /location/of/zope/start/script" somewhere in the script (not recommended, use the full path to the command instead) instead of having your script sleep and then run again, why don't use just run it out of cron once every say, fifteen minutes or half hour? -- jacob walcik jwalcik@notwithstanding.org On Mon, 14 May 2001, Ben Ocean wrote:
At 03:14 PM 5/14/2001 -0500, you wrote:
For some reason, from what I can judge a bug in the source code that affects some unfortunate ones such as myself, ZServer crashes every few hours and has to be re-started. So I wrote this script:
What file is this bug in? What line number?
I don't know. All I know is that from the discussion on this list last week, I discovered *several* people have had a problem with the ZServer quitting for no apparent reason since the early days of Zope. Now, that sounds like a bug to me.
So I've come up with a work-around.
You seem like you know programming and Zope better than I. Would you mind helping me? Here's my question:
For some reason, ZServer crashes every few hours and has to be re-started. So I wrote this script:
#!/bin/sh while : # if there's a page there, copy it to a test file do `wget -q -t 3 -T 30 http://thewebsons.com:8080/index_html -O test` # if there's something in the test file, go take a nap if grep '^<' test then sleep 60 # whoops! Why the heck does RH6.2 complain there's no ./start file?? Sometimes it complains, sometimes not. Hmmm... else if ./start then ./start & sleep 60 else sleep 10 fi fi done <<< and just let the fool thing run (in the Zope installation). But now I get error messages stating ./start doesn't exist! That's why the *else if* stuff, but it _still isn't good enough! Come back hours later and Zope's dead as a doornail. Furthermore, my script's not running, either. I don't get it! What am I not seeing? TIA, BenO P.S. If there were a way to keep my ZServer from crashing *without* this script, sure would like to know what it is...
_______________________________________________ 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 )
I don't know. All I know is that from the discussion on this list last week, I discovered *several* people have had a problem with the ZServer quitting for no apparent reason since the early days of Zope. Now, that sounds like a bug to me.
Actually, I believe several people have reported that Zope *hangs* on them, for unknown reasons. I didn't see a corroborative report of Zope *crashing* on them. These are likely (at least) two distinct problems. I'd like to help you. I'd like to help everybody, actually. But I can't without a little help from you. Providing a bug report that says "Zope crashes/hangs on me, I can't establish a pattern, it happens at all times of the day, and I haven't spend any time narrowing the symptoms down any further" is a bug report that I can't do much with. I can ask you for more information (which I've done), but otherwise I'm fairly helpless. We've solved these sorts of problems in the past with help from folks who were able/willing to narrow down the problem to a replicable test case. If you can spend the time to do the same, we can likely solve it or at least provide a workaround. - C
At 05:59 PM 5/14/2001 -0400, you wrote:
Actually, I believe several people have reported that Zope *hangs* on them, for unknown reasons. I didn't see a corroborative report of Zope *crashing* on them. These are likely (at least) two distinct problems.
Ah! Thank you: I see, now.
I'd like to help you. I'd like to help everybody, actually. But I can't without a little help from you. Providing a bug report that says "Zope crashes/hangs on me, I can't establish a pattern, it happens at all times of the day, and I haven't spend any time narrowing the symptoms down any further" is a bug report that I can't do much with. I can ask you for more information (which I've done), but otherwise I'm fairly helpless.
We've solved these sorts of problems in the past with help from folks who were able/willing to narrow down the problem to a replicable test case. If you can spend the time to do the same, we can likely solve it or at least provide a workaround.
The only information I have thus far is that my little shell script complains that it can't find the ./start script, even after it's found it before. Perhaps it starts Zope, checks on Zope, then when Zope crashes suddenly it can no longer find the ./start file. But I can find it! It hasn't gone anywhere. Then, equally inexplicably, my infinite loop script dies. I created a STUPID_LOG_FILE and made the appropriate changes (to ./start, I believe) but nothing's been reported. I just now made a log file for my shell script. We'll see if it catches anything. I *have* noticed this:
2001-05-14T22:02:57 INFO(0) ZServer HTTP server started at Mon May 14 15:02:57 2 001 Hostname: thor.ccom.net Port: 8080
2001-05-14T22:02:57 INFO(0) ZServer FTP server started at Mon May 14 15:02:57 20 01 Hostname: thewebsons.com Port: 8021 <<< where the Hostname is different for each server, but this was due to moving the server and the problem was there prior to the move, so this problem may be cosmetic only. Can you suggest other ways I try and catch this problem? TIA, BenO
Ben Ocean wrote:
The only information I have thus far is that my little shell script complains that it can't find the ./start script, even after it's found it before. Perhaps it starts Zope, checks on Zope, then when Zope crashes suddenly it can no longer find the ./start file. But I can find it! It hasn't gone anywhere. Then, equally inexplicably, my infinite loop script dies.
Shell scripting is a mysterious art to mere mortals like you and I. I don't think I'd ever trust a shell script to run forever, since I've written scripts that sometimes do what I expect and sometimes behave differently with the *exact* same input, and never been able to solve it. Some things I'd try: 1) If it can't find ./start each time, put in the full path to your start script. Problem gone. 2) Maybe add another cron job that checks to see if your first script is running, and starts it if not? ps | grep should tell you if it's running. I know, this is getting very hacky... -- ................... paul winkler .................... custom calendars & printing: http://www.calendargalaxy.com A member of ARMS: http://www.reacharms.com home page: http://www.slinkp.com
participants (5)
-
Ben Ocean -
Chris McDonough -
jacob walcik -
Paul Winkler -
Steve Drees