I usually run my appserver (Enhydra) as mentioned, but I redirect to a file and then do a
tail -f Appserver.log
to watch the output.
I'm running FreeBSD 4.4 RELEASE on my dev server so I though I'd try some things out. Right away I noticed that I am not seeing the
output of any print statments being redirected
I tried
Bash $AppServer daemon >/dev/null 2>&1
and
Bash $python Launch.py ThreadedAppServer &> Logs/Appserver.log
but it does not seem to capture print statemens
So the last line in my log file is
Creating 10 threads..........
I never see the
ready
Has anyone else seen this or am I just missing the obvious?
Thanks,
-Aaron
----- Original Message -----
From: "Geoffrey Talvola" <gtalvola@...>
To: "Jeff Johnson" <jeff@...>; <webware-devel@...>
Sent: Wednesday, October 17, 2001 9:26 AM
Subject: Re: [Webware-devel] webware daemon worries
> Jeff,
>
> I confirmed that this is a problem on my newly-installed Linux Mandrake 8.1
> also. That is, if I start the appserver using
>
> ./AppServer daemon
>
> Then everything works fine until I close the "Konsole" window that I used to
> start Webware. After that point, I get failures like you mention, where any
> page that prints a lot of stuff to stdout or stderr fails, eventually
> bringing down the appserver. The "Error" example page that comes with
> Webware is a prime example.
>
> But, if I instead start the appserver with:
>
> ./AppServer daemon >/dev/null 2>&1
>
> Then I can close the "Konsole" window with no problems. All servlets work
> correctly.
>
> Have you tried this?
>
> I would imagine that redirecting to a file would also work properly, but I
> haven't tried it.
>
> - Geoff
>
>
> On Tuesday October 16, 2001 10:57 am, Jeff Johnson wrote:
> > I'm still a little worried about Webware running as a daemon. I assign
> > a file-like class that doesn't write anything to sys.stdout and
> > sys.stderr, otherwise print statements will raise exceptions and
> > eventually Webware will run out of servlet threads or lose the main
> > thread. I don't know why I'm the only person that has had a problem
> > with it, it should probably happen on all *nix systems. The sys.stdout
> > fix solves the main problem but I still see exceptions printed when a
> > syntax error is introduced so if we are developing new servlet code we
> > have to be careful not to crash Webware if it's console was closed. I'm
> > not sure why the Python import code is writing to it's own copy of
> > stdout/stderr instead of my silent version.
> >
> > Any comments? Can we add the silent stdout/stderr to CVS? It works
> > well except for syntax errors. Ideally a production server shouldn't
> > have syntax errors but Webware shouldn't rely on that.
> >
> >
> >
> > Index: ThreadedAppServer.py
> > ===================================================================
> > RCS file: /cvsroot/webware/Webware/WebKit/ThreadedAppServer.py,v
> > retrieving revision 1.47
> > diff -r1.47 ThreadedAppServer.py
> > 627a628,635
> >
> > > class BitBucket:
> > > def flush(self):
> > > pass
> > > def write(self, s):
> > > pass # nobody watches
> > > sys.stdout = BitBucket()
> > > sys.stderr = BitBucket()
> >
> > _______________________________________________
> > Webware-devel mailing list
> > Webware-devel@...
> > https://lists.sourceforge.net/lists/listinfo/webware-devel
>
> _______________________________________________
> Webware-devel mailing list
> Webware-devel@...
> https://lists.sourceforge.net/lists/listinfo/webware-devel
|