OS Error when running evnet based webserver #3

phani-vadrevu opened this Issue Sep 5, 2012 · 2 comments


None yet

2 participants


I've been using the web server for a while now. But once in a while, the program crashes with the following error. I couldn't reproduce the error separately, but this happens often for me. Can you make out something here?

Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/evnet-1.0_5-py2.7.egg/evnet/__init__.py", line 49, in loop
else: l.start()
OSError: [Errno 9] Bad file descriptor: '<pyev.Io object at 0x31c6af0> has been stopped'
oserror [Errno 9] Bad file descriptor: '<pyev.Io object at 0x31c6af0> has been stopped' (9, 'Bad file descriptor')


Sorry for getting back on this so late - I've been looking at the code and also my long-running systems based on evnet and I currently don't see this happen anywhere.

My guess is that you somehow don't close the sockets / connections correctly or maybe you are registering them multiple times somehow. I'm can't be sure without seeing the application side of this. At least for evnet I can't currently see a bug that causes this.

What we could do is a dirty workaround that catches this OSError, removes the watcher and restarts the event loop. This however would only be a workaround as the bug is still in there somewhere.


closing for now, consider moving to gevent :)

@rep rep closed this Mar 24, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment