On Sun, Mar 3, 2013 at 1:21 PM, Alec Matusis
<matusis@yahoo.com> wrote:
I had 60 busy tcp servers that ran on Python 2.6/Twisted 10.0 (or Twisted
9.0) for over two years with not problems. After I upgraded to Twisted
12.3/Python 2.7, I started getting the errors below (no application code
changes). It took about two days for the first error to appear on a busy
server under heavy load:
[twisted.internet.protocol.ServerFactory] Unhandled Error
Traceback (most recent call last):
File
"/usr/local/encap/Python-2.7.3/lib/python2.7/site-packages/twisted/python/lo
g.py", line 73, in callWithCon
text
return context.call({ILogContext: newCtx}, func, *args, **kw)
File
"/usr/local/encap/Python-2.7.3/lib/python2.7/site-packages/twisted/python/co
ntext.py", line 118, in callWi
thContext
return self.currentContext().callWithContext(ctx, func, *args,
**kw)
File
"/usr/local/encap/Python-2.7.3/lib/python2.7/site-packages/twisted/python/co
ntext.py", line 81, in callWit
hContext
return func(*args,**kw)
File
"/usr/local/encap/Python-2.7.3/lib/python2.7/site-packages/twisted/internet/
posixbase.py", line 614, in _d
oReadOrWrite
why = selectable.doRead()
--- <exception caught here> ---
File
"/usr/local/encap/Python-2.7.3/lib/python2.7/site-packages/twisted/internet/
tcp.py", line 1069, in doRead
transport = self.transport(skt, protocol, addr, self, s,
self.reactor)
File
"/usr/local/encap/Python-2.7.3/lib/python2.7/site-packages/twisted/internet/
tcp.py", line 786, in __init__
self.startReading()
File
"/usr/local/encap/Python-2.7.3/lib/python2.7/site-packages/twisted/internet/
abstract.py", line 429, in sta
rtReading
self.reactor.addReader(self)
File
"/usr/local/encap/Python-2.7.3/lib/python2.7/site-packages/twisted/internet/
epollreactor.py", line 256, in
addReader
_epoll.EPOLLIN, _epoll.EPOLLOUT)
File
"/usr/local/encap/Python-2.7.3/lib/python2.7/site-packages/twisted/internet/
epollreactor.py", line 240, in
_add
self._poller.modify(fd, flags)
exceptions.IOError: [Errno 2] No such file or directory
After the error occurs, the server usually locks up and does not accept new
connections. One server self-recovered after these errors after 30min
outage, and started accepting new connections.
Apparently I am not the ony one who has enountered this:
http://stackoverflow.com/questions/12600137/twisted-internet-epollreactor-py
-line-238-in-add
Is there a patch available, or should I roll back to 10.0.0?
_______________________________________________
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
Hi All
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.
Regards
gelin yan