To summarize Jean-Paul's link, you can just a two-liner patch in the epollreactor.py to fix this (after line 201 if you're using the twisted 2.50 release)<br><br>if event & _epoll.HUP or event & _epoll.ERR:
<br> why = main.CONNECTION_LOST<br><br><br><div class="gmail_quote">On Dec 11, 2007 9:57 PM, Jean-Paul Calderone <<a href="mailto:exarkun@divmod.com">exarkun@divmod.com</a>> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="Ih2E3d">On Tue, 11 Dec 2007 15:06:45 +0200, Mustafa Sakalsiz <<a href="mailto:sakalsiz@gmail.com">sakalsiz@gmail.com</a>> wrote:<br>>We have a twisted application uses the epoll reactor. Sometimes it<br>
>wastes %100 cpu. It has also some threads for single isolated<br>>functions (using deferToThred). First we suspected that threads don't<br>>end and goes to an infinite loop. Because application still accepts
<br>>connections and executes the requested functions. Then I ran the<br>>following ps command<br>><br>>ps h -Leo pid,pcpu,args,lwp<br>><br>>Looking at the output, the main thread seemed to be wasting the whole
<br>>cpu time. Later on I attached the process to the strace and saw the<br>>output below. I don't how does it happen or when does it happen. It is<br>>not regular nor repeatable, but this is the strace output when it gets
<br>>into loop. I send to the list, because it may be useful for someone.<br>><br>>Now we switched back to the select reactor.<br>><br>>P.S.: We use perspective broker on the server side and qt4reactor for<br>
>the client.<br><br></div>This sounds like this issue:<br><br> <a href="http://twistedmatrix.com/trac/ticket/2809" target="_blank">http://twistedmatrix.com/trac/ticket/2809</a><br><br>This is fixed in current trunk@HEAD
and the fix will be included in the<br>next release of Twisted.<br><font color="#888888"><br>Jean-Paul<br></font><div><div></div><div class="Wj3C7c"><br>_______________________________________________<br>Twisted-Python mailing list
<br><a href="mailto:Twisted-Python@twistedmatrix.com">Twisted-Python@twistedmatrix.com</a><br><a href="http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python" target="_blank">http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
</a><br></div></div></blockquote></div><br>