[Zope] ?? server accept() threw an exception ??

Dieter Maurer dieter@handshake.de
Mon, 9 Sep 2002 19:17:47 +0200


--/HBKLR8NIG
Content-Type: text/plain; charset=us-ascii
Content-Description: message body text
Content-Transfer-Encoding: 7bit

Bakhtiar Abdul Hamid writes:
 > ...
 > >  > 2002-09-08T14:25:54 PROBLEM(100) ZServer warning: server accept()
 > >  > threw an exception
 > >  > """
 > > I have seen similar behaviour under Solaris.
 > > But there, it was an infinite loop filling the log file very quickly
 > > up to the 2 GB limit.
 > > 
 > > I patched the code to let Zope die in case of an "accept" exception.
 > > As it is immediately restarted, this seems a not too bad approach.
 > ...
 > so, can i have a look at your patch plese? :)
Patch attached.


Dieter

--/HBKLR8NIG
Content-Type: text/plain
Content-Description: ZServer "accept" patch
Content-Disposition: inline;
	filename="accept.pat"
Content-Transfer-Encoding: 7bit

--- ZServer/medusa/http_server.py~	Wed Jan  9 18:33:50 2002
+++ ZServer/medusa/http_server.py	Mon Sep  9 19:14:55 2002
@@ -631,6 +631,10 @@
                 # address family is unknown.  We don't want the whole server
                 # to shut down because of this.
             self.log_info ('warning: server accept() threw an exception', 'warning')
+            raise # reraise to let Zope die; this error can cause an infinite
+                  # loop quickly filling the log file
+                  # as Zope is restarted automatically (beware, not on Windows!)
+                  # the death should not be a big problem
             return
         except TypeError:
                 # unpack non-sequence.  this can happen when a read event

--/HBKLR8NIG--