nice suggestion , <div>We decide to use UPD now<br><br><div class="gmail_quote">2012/6/22 MORITA Kazutaka <span dir="ltr"><<a href="mailto:morita.kazutaka@gmail.com" target="_blank">morita.kazutaka@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">At Fri, 22 Jun 2012 00:00:26 +0800,<br>
<div class="im">Kuo Hugo wrote:<br>
><br>
> Hi folks ,<br>
><br>
> We're facing an issue related to the bug as below<br>
><br>
> /dev/log rotations can cause object-server failures<br>
>                                 <a href="https://bugs.launchpad.net/swift/+bug/780025" target="_blank">https://bugs.launchpad.net/swift/+bug/780025</a><br>
><br>
> My Swift version : 1.4.9<br>
><br>
> But I found that not only object-server but also all swift related workers<br>
> those log through rsyslog.<br>
> There's a easy way to reproduce it ,<br>
> 1. Run swift-bench<br>
> 2. restart/stop rsyslog during swift-bench progress....<br>
><br>
> You can see that all CPU usage reach to 100%<br>
><br>
> Should it be an additional bug ? If so , I can file it .<br>
><br>
> Is there anyway to improve this behavior ? I expect that all swift workers<br>
> should keep working even though that rsyslog dead or restart.<br>
<br>
</div>I've faced with the same problem and found that it was a bug of the<br>
python logging module.  I think the following patch against the module<br>
would solve the problem.<br>
<br>
diff --git a/logging/handlers.py b/logging/handlers.py<br>
index 756baf0..d2a042a 100644<br>
--- a/logging/handlers.py<br>
+++ b/logging/handlers.py<br>
@@ -727,7 +727,11 @@ class SysLogHandler(logging.Handler):<br>
         except socket.error:<br>
             self.socket.close()<br>
             self.socket = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)<br>
-            self.socket.connect(address)<br>
+            try:<br>
+                self.socket.connect(address)<br>
+            except socket.error:<br>
+                self.socket.close()<br>
+                raise<br>
<br>
     # curious: when talking to the unix-domain '/dev/log' socket, a<br>
     #   zero-terminator seems to be required.  this string is placed<br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div>+Hugo Kuo+</div><div><a href="mailto:tonytkdk@gmail.com" target="_blank">tonytkdk@gmail.com<br></a></div><div><a href="mailto:tonytkdk@gmail.com" target="_blank">+</a>886 935004793</div>
<br>
</div>