RE:SOLVED: Why my Zope kept dying
Hi Darren, You wrote: ... snip
This sounded like what I was experiencing. As long as I left the terminal window open, it seemed to run find, but if I closed the connection or tried running another command it would quit. So I took a look at the Start script and it was indeed setting the "-D" option in the last line of the script. I removed the last line, restarted Zope and it has been up since. ...snip
I'm a zope-digest member and thought your problem was so trivial that I didn't respond. But now I think I should. If you'r using a Unix or Linux operating system and you start the Start script like this: prompt>./start <enter> or prompt>/Web/zope/start <enter> Than the output zope generates is attached to the window in which you started zope. When you want to start zope in Debug mode, but want to be able to close a window, you should make sure the Zope proces is pushed to the background, like this: prompt>./start & <enter> Problem solved... Greetings, Ria Marinussen Webmaster Department of Computer Science University of Twente, the Netherlands
On Thu, Mar 07, 2002 at 09:13:23AM +0100, Ria Marinussen wrote:
When you want to start zope in Debug mode, but want to be able to close a window, you should make sure the Zope proces is pushed to the background, like this: prompt>./start & <enter>
I think this needs a bit of clarification (*nix-specific details here, may or may not apply to your exact system, but this experience was with Linux): Ways to start Zope: - From a startup script (in /etc/init.d, /etc/rc.local, wherever) during the usual system startup. - From the same or similar startup script or command after system startup. For example, when you upgrade versions of Zope and don't reboot the system afterwards, or when you restart it with debugging enabled. One common way to make Zope crash or otherwise flake out (most common symptom I've seen is nonfatal IOError exceptions) is to have bare print statements in the Python code for debugging purposes. Those bare prints end up going to the controlling terminal's standard output. For a Zope started by method 1 above, bare prints will never crash it. For a Zope started by method 2, bare prints *will* start crashing or otherwise flaking Zope randomly once you've closed the controlling terminal. Backgrounding the Zope start command with a simple '&' at the end of the line will *not* help matters. Two safe solutions: - Redirect *all* standard output and standard error text into a file, or into /dev/null -- something line './start 2>&1 > /somefile &' - Run your Zope script inside a 'screen' session. See http://www.linuxgazette.com/issue32/tag_detach.html for some details on this program. -- Mike Renfro / R&D Engineer, Center for Manufacturing Research, 931 372-3601 / Tennessee Technological University -- renfro@tntech.edu
On Thu, 2002-03-07 at 15:49, Mike Renfro wrote:
Two safe solutions:
- Redirect *all* standard output and standard error text into a file, or into /dev/null -- something line './start 2>&1 > /somefile &'
- Run your Zope script inside a 'screen' session. See http://www.linuxgazette.com/issue32/tag_detach.html for some details on this program.
Or: - Use the nohup command, e.g. 'nohup ./start'
participants (3)
-
Mike Renfro -
Ria Marinussen -
seb bacon