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
Cannot use high-numbered sockets in 2.4.3 #43402
Comments
Python 2.4.3 introduced (in Modules/socketmodule.c) the However, it executes this check even when it won't I have a twisted application which uses many FDs A simple solution relies on the fact that select is This doesn't solve the more general problem in Mike |
Logged In: YES Try "ulimit -n 8096" (only permitted in a root shell) to set |
Logged In: YES Never mind- you already tried ulimit. It still works for me |
Logged In: YES Please disregard my comments completely- just opening more |
Logged In: YES Yes, I had my ulimit set appropriately. There's no problem with _opening_ many sockets (at least, I The code in socketmodule.c is pretty clear - and having For now, we're having to keep all our production machines on |
Logged In: YES I expect such a patch would be acceptable. The largest |
Logged In: YES That, of course, is the problem - select() is available more It's not clear that the complexity of doing this is Regardless, it'd be nice if at least the basic fix I wrote |
Logged In: YES akuchling: No, poll() is not part of the Windows socket API. |
Logged In: YES A patch to replace internal_select with poll(2) where Relaxing the IS_SELECTABLE usage to cases where select is |
Logged In: YES eew yuck. yes use poll at the very least. we should also consider using epoll (linux) and kevent (bsd) |
Logged In: YES Ok, I'll attach a patch that uses poll when available It replaces one of the two uses of select() (specifically, greg: epoll/kevent don't make sense for replacing the use of I've tested this locally, and it fixes the problem |
Logged In: YES I've added a more complete patch (against 2.5, hopefully If you are forced to use select with a high socket, the |
Logged In: YES The __APPLE__ stuff looks wrong in file 184131. You would |
Logged In: YES I think you're right Martin. Looking at what it means to |
Logged In: YES I meant I don't think we *care* in this case (not can). |
Logged In: YES The patch is fine, please apply. |
Logged In: YES Anthony checked this in to 2.5 as 50567. I will backport at |
Logged In: YES Applied. Patch will be in 2.5b2 (to be released shortly). |
Logged In: YES Re-opening to remind myself to apply this to release24-maint |
Logged In: YES This is applied and will be in 2.3.3c1 |
Logged In: YES I assume 2.3.3c1 means 2.4.4c1. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: