New submission from Беатрис Бонева <beatrisvbon...@gmail.com>:
The select function does not work for file descriptors with number >= 1024. It has FD_SETSIZE limit (see https://stackoverflow.com/questions/7976388/increasing-limit-of-fd-setsize-and-select#7977082). So, serve_forever won't work if more than 1024 file descriptors are opened in the process (ValueError: filedescriptor out of range in select() is raised). Moreover, the select function is considered inefficient, hard to scale and old-fashioned nowadays. Refer to https://stackoverflow.com/questions/970979/what-are-the-differences-between-poll-and-select#3951845. Better alternative will be to use poll or epoll even. ---------- components: Library (Lib) messages: 303127 nosy: Беатрис Бонева priority: normal severity: normal status: open title: Use select.poll instead of select.select in SocketServer.BaseServer.serve_forever type: performance _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue31610> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com