-
Notifications
You must be signed in to change notification settings - Fork 732
"filedescriptor out of range in select()" error in _ready_for_reading #354
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Thanks for creating this issue! I really had no idea this would happen. Probably, I can fall back to epoll or poll if |
AIUI, the main difference is in which platforms each function exists on. On Python 3, the selectors module provides a high-level interface which will automatically select the best available mechanism. |
Hi @dsclose, Normally this should be fixed by now. Can you try, using the latest commit from the master branch? Thanks! |
Hi @jonathanslenders, well done on sorting that - I'll do my best to check that it is working over the next couple of days for you. |
@jonathanslenders looks like commit c3c994a has resolved this issue. Verified with the following steps:
We'll continue to use iPython 4 until this commit gets into PyPi - thanks for your swift response on this! |
As of Release 1.0.4 I'm marking this issue as closed. |
On a machine with more than 1024 open file-descriptors, the _ready_for_reading function (eventloop/posix.py) will always raise a "ValueError: filedescriptor out of range in select()".
This is because of the use of the select.select function to poll file-descriptors. A hard-limit of 1024 on any file-descriptor passed to select.select is built into Python at compile-time using the FD_SETSIZE value. On most platforms, this is 1024. An administrator may allow more file-descriptors to be opened on busy machines making the select function unreliable in posix environments.
On posix environments, the select.poll function will provide the same functionality as select in this context. It is also not limited by the FD_SETSIZE value. May I recommend switching to this function on posix environments or otherwise catching the ValueError in your _select wrapper?
This is currently preventing us from using IPython v5, as we often use machines with more than 1024 open file-descriptors. Below is a traceback from one such IPython session:
The text was updated successfully, but these errors were encountered: