S
S
semenoveg2016-06-03 07:36:41
Python
semenoveg, 2016-06-03 07:36:41

Why does the Twisted server stop accepting new connections?

Python 2.7.10
Twisted 13.2.0
Tried other versions of twisted up to 15.
At some point, the service written in twisted stops accepting connections, the following errors fall into the log:

Traceback (most recent call last):
          File "/usr/lib64/python2.7/site-packages/twisted/python/log.py", line 73, in callWithContext
            return context.call({ILogContext: newCtx}, func, *args, **kw)
          File "/usr/lib64/python2.7/site-packages/twisted/python/context.py", line 118, in callWithContext
            return self.currentContext().callWithContext(ctx, func, *args, **kw)
          File "/usr/lib64/python2.7/site-packages/twisted/python/context.py", line 81, in callWithContext
            return func(*args,**kw)
          File "/usr/lib64/python2.7/site-packages/twisted/internet/posixbase.py", line 614, in _doReadOrWrite
            why = selectable.doRead()
        --- <exception caught here> ---
          File "/usr/lib64/python2.7/site-packages/twisted/internet/tcp.py", line 1069, in doRead
            transport = self.transport(skt, protocol, addr, self, s, self.reactor)
          File "/usr/lib64/python2.7/site-packages/twisted/internet/tcp.py", line 786, in __init__
            self.startReading()
          File "/usr/lib64/python2.7/site-packages/twisted/internet/abstract.py", line 434, in startReading
            self.reactor.addReader(self)
          File "/usr/lib64/python2.7/site-packages/twisted/internet/epollreactor.py", line 271, in addReader
            EPOLLIN, EPOLLOUT)
          File "/usr/lib64/python2.7/site-packages/twisted/internet/epollreactor.py", line 255, in _add
            self._poller.modify(fd, flags)
        exceptions.IOError: [Errno 2] No such file or directory

The search finds similar problems, but there everyone agrees that this is a reactor bug. Judging by the trace, this happens in the insides of the twisted kernel. Maybe someone faced a similar problem? Were you able to solve it?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question