> Geoffrey Talvola <gtalvola@...> wrote:
> > Or, it could be made a config setting, so we're covered when the
> > same problem shows up on another OS. While we're at it, we ought to
> > add a config setting to suck up stdout and stderr to avoid the
> > _other_ FreeBSD problem Jeff reported.
> The possibility should also be considered that this isn't a FreeBSD
> problem, but a problem of running Webware in daemon mode, under normal
> production conditions.
> Jeff may very well be the only person doing that under significant
> load. I've been running Webware as a daemon happily under Linux, but
> only with insignificant load.
Are you closing the console that started the daemon? If so, are you
redirecting output to /dev/null?
The print "." fixed the problem where the socket took 30 seconds to
after shutdown before the port could bind again. No load required, I
just start, stop, attempt restart which would fail with a socket bind
error. Not even in daemon mode.
The other error isn't Webware, just normal Python, printing to
sys.stdout (just a file) raises an exception when the console is closed
and the file is no longer valid. That can be reproduced with the simple
python program below. Maybe different *nixes will behave differently.
import time, traceback
f =3D open("x.txt","a")
f =3D open("x.txt",'a')
if __name__ =3D=3D '__main__':
for x in range(1023,1026):
s =3D "X" * x
w("about to write %d bytes.\n" % x)