> Geoffrey Talvola <[EMAIL PROTECTED]> 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
def w(s):
f = open("x.txt","a")
f.write(s)
f.close()
def wtrace():
f = open("x.txt",'a')
traceback.print_exc(file=f)
f.write("\n")
f.close()
if __name__ == '__main__':
while 1:
w("\n")
for x in range(1023,1026):
s = "X" * x
w("about to write %d bytes.\n" % x)
try:
print s
except:
w("ERROR")
wtrace()
time.sleep(5)
_______________________________________________
Webware-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/webware-devel