<br><br><div class="gmail_quote">On Sun, Mar 3, 2013 at 1:21 PM, Alec Matusis <span dir="ltr">&lt;<a href="mailto:matusis@yahoo.com" target="_blank">matusis@yahoo.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I had 60 busy tcp servers that ran on Python 2.6/Twisted 10.0 (or Twisted<br>
9.0) for over two years with not problems. After I upgraded to Twisted<br>
12.3/Python 2.7, I started getting the errors below (no application code<br>
changes). It took about two days for the first error to appear on a busy<br>
server under heavy load:<br>
<br>
[twisted.internet.protocol.ServerFactory] Unhandled Error<br>
        Traceback (most recent call last):<br>
          File<br>
&quot;/usr/local/encap/Python-2.7.3/lib/python2.7/site-packages/twisted/python/lo<br>
g.py&quot;, line 73, in callWithCon<br>
text<br>
            return context.call({ILogContext: newCtx}, func, *args, **kw)<br>
          File<br>
&quot;/usr/local/encap/Python-2.7.3/lib/python2.7/site-packages/twisted/python/co<br>
ntext.py&quot;, line 118, in callWi<br>
thContext<br>
            return self.currentContext().callWithContext(ctx, func, *args,<br>
**kw)<br>
          File<br>
&quot;/usr/local/encap/Python-2.7.3/lib/python2.7/site-packages/twisted/python/co<br>
ntext.py&quot;, line 81, in callWit<br>
hContext<br>
            return func(*args,**kw)<br>
          File<br>
&quot;/usr/local/encap/Python-2.7.3/lib/python2.7/site-packages/twisted/internet/<br>
posixbase.py&quot;, line 614, in _d<br>
oReadOrWrite<br>
            why = selectable.doRead()<br>
        --- &lt;exception caught here&gt; ---<br>
          File<br>
&quot;/usr/local/encap/Python-2.7.3/lib/python2.7/site-packages/twisted/internet/<br>
tcp.py&quot;, line 1069, in doRead<br>
            transport = self.transport(skt, protocol, addr, self, s,<br>
self.reactor)<br>
          File<br>
&quot;/usr/local/encap/Python-2.7.3/lib/python2.7/site-packages/twisted/internet/<br>
tcp.py&quot;, line 786, in __init__<br>
            self.startReading()<br>
          File<br>
&quot;/usr/local/encap/Python-2.7.3/lib/python2.7/site-packages/twisted/internet/<br>
abstract.py&quot;, line 429, in sta<br>
rtReading<br>
            self.reactor.addReader(self)<br>
          File<br>
&quot;/usr/local/encap/Python-2.7.3/lib/python2.7/site-packages/twisted/internet/<br>
epollreactor.py&quot;, line 256, in<br>
 addReader<br>
            _epoll.EPOLLIN, _epoll.EPOLLOUT)<br>
          File<br>
&quot;/usr/local/encap/Python-2.7.3/lib/python2.7/site-packages/twisted/internet/<br>
epollreactor.py&quot;, line 240, in<br>
 _add<br>
            self._poller.modify(fd, flags)<br>
        exceptions.IOError: [Errno 2] No such file or directory<br>
<br>
<br>
After the error occurs, the server usually locks up and does not accept new<br>
connections. One server self-recovered after these errors after 30min<br>
outage, and started accepting new connections.<br>
Apparently I am not the ony one who has enountered this:<br>
<a href="http://stackoverflow.com/questions/12600137/twisted-internet-epollreactor-py
-line-238-in-add" target="_blank">http://stackoverflow.com/questions/12600137/twisted-internet-epollreactor-py<br>
-line-238-in-add</a><br>
<br>
Is there a patch available, or should I roll back to 10.0.0?<br>
<br>
<br>
<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>
</blockquote></div><br><div>Hi All</div><div><br></div><div>   I remembered twisted started using python own select.epoll instead of its own implementation after dropping support for python 2.5. Is it the reason? A few days ago, there was a post asking a similar question.</div>
<div><br></div><div>Regards</div><div><br></div><div>gelin yan</div>