Comments (8)
that seems to be general problem which is caused by inconsistency between epoll.c and select.epoll in py2.6
epoll.c raises OSError, while select.epoll raises IOError.
may be the best way to fix this is to alter epoll.c and tornado to use IOError like select.epoll does
from tornado.
This sounds reasonable.
Is this project being maintained? There hasn't been any activity on it in month and I don't want to maintain a fork for simple bug fixes.
from tornado.
Seeing this problem as well. It doesn't actually seem to break my code at all; it just adds a bunch of slightly alarming little tracebacks in the logging output.
from tornado.
Thanks stevvooe and others, this has been fixed: http://github.com/facebook/tornado/commit/57ec818a3f8ab56dec1b6cf585fa7c8c4d6ab80a
from tornado.
Same issue in the loop that calls remove_handler(fd)
2010-07-26 12:00:50,449 [ERROR] - Exception in callback > Traceback (most recent call last): File "/usr/local/jive/python/lib/python2.6/site-packages/tornado/ioloop.py", line 245, in _run_callback callback() File "/usr/local/jive/python/lib/python2.6/site-packages/tornado/httpclient.py", line 214, in _perform self.io_loop.remove_handler(fd) File "/usr/local/jive/python/lib/python2.6/site-packages/tornado/ioloop.py", line 135, in remove_handler self._impl.unregister(fd) IOError: [Errno 2] No such file or directory
In httpclient.py
for fd in self._fds:
if fd not in fds:
self.io_loop.remove_handler(fd)
from tornado.
it seems to be rather common for epoll to spuriously forget about descriptors once they become unpollable (e.g. peer shuts down connection).
Traceback (most recent call last):
File "/usr/local/lib/python2.6/dist-packages/tornado-1.1-py2.6.egg/tornado/httpclient.py", line 205, in _handle_socket
self.io_loop.update_handler(fd, ioloop_event)
File "/usr/local/lib/python2.6/dist-packages/tornado-1.1-py2.6.egg/tornado/ioloop.py", line 155, in update_handler
self._impl.modify(fd, events | self.ERROR)
IOError: [Errno 2] No such file or directory
Traceback (most recent call last):
File "/usr/local/lib/python2.6/dist-packages/tornado-1.1-py2.6.egg/tornado/httpclient.py", line 205, in _handle_socket
self.io_loop.update_handler(fd, ioloop_event)
File "/usr/local/lib/python2.6/dist-packages/tornado-1.1-py2.6.egg/tornado/ioloop.py", line 155, in update_handler
self._impl.modify(fd, events | self.ERROR)
IOError: [Errno 2] No such file or directory
fix:
$ git diff
diff --git a/tornado/ioloop.py b/tornado/ioloop.py
index ea34e0f..dbda034 100644
--- a/tornado/ioloop.py
+++ b/tornado/ioloop.py
@@ -152,7 +152,11 @@ class IOLoop(object):
def update_handler(self, fd, events):
"""Changes the events we listen for fd."""
- self._impl.modify(fd, events | self.ERROR)
+ try:
+ self._impl.modify(fd, events | self.ERROR)
+ except (OSError, IOError):
+ logging.debug("Error updating fd in IOLoop", exc_info=True)
+
def remove_handler(self, fd):
"""Stop listening for events on fd."""
from tornado.
With Python 3.4.3, Linux 3.19.0-22-generic and Tornado 4.2.1 I still get this error incidentally, when I run a spider with 100+ concurrency.
DEBUG:tornado.general:Error deleting fd from IOLoop
Traceback (most recent call last):
File "/usr/local/lib/python3.4/dist-packages/tornado/ioloop.py", line 715, in remove_handler
self._impl.unregister(fd)
FileNotFoundError: [Errno 2] No such file or directory
from tornado.
This is just a "debug" logging message; it doesn't indicate an actual problem.
from tornado.
Related Issues (20)
- py3.12: datetime.datetime.utcfromtimestamp() is deprecated and scheduled for removal HOT 4
- Inaccurate typing for body/query argument getters
- High CPU consumption when upgrade to tornado > 5 HOT 2
- Can I write a single decorator combining @tornado.gen.coroutine and @run_on_executor. HOT 2
- Possible leak when exception is raised in inner coroutine HOT 1
- iostream: SSL logging is too noisy
- Tornado was blocked for more than 1 second in HOT 1
- static_url with a prefix does not work in a Template tag HOT 2
- how to handle the http stream data without using callback but based on coroutine? HOT 1
- Test fail with openssl 3.2 HOT 1
- tornado.websocket.WebSocketClosedError HOT 1
- Send 204 as HTTPError
- Tornado Websocket write message performance degradation when binary is False HOT 2
- `Subprocess.wait_for_exit` never resolves if process terminated before it is called HOT 3
- Websocket Client Handshake URI issue HOT 1
- Questions about Copilot + Open Source Software Hierarchy
- tornado.httputil.HTTPServerRequest and tornado.web.RequestHandler HOT 1
- Please update to 3.11 HOT 1
- TypeError: WebSocketHandler.init() missing 2 required positional arguments: 'application' and 'request' HOT 1
- Under pytest 8.2.0, 'AsyncHTTPTestCase' has no attribute 'runTest' HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tornado.