3 ms·
gunicorn (Python, in case you’re lucky enough to not have run across it) forks after creating listener socket(s). Every child does the epoll thing. When awakene
by rachelbythebay 7y ago
gunicorn (Python, in case you’re lucky enough to not have run across it) forks after creating listener socket(s). Every child does the epoll thing. When awakened, they all call accept4 and then all but one gets -1.
This happens right now and “powers” a stupid amount of the economy. And it’s wasteful.
- joosters 7y agoOur old mechanism was a parent process that created the listen sockets, and then sent the FDs to the previously-created child processes. (The children would be registering their FDs with epoll and then calling accept() themselves) That never seemed to trigger the problem.
- pstrateman 7y agoThe issue is whether they're using level or edge triggering with epoll. With level you won't miss events, with edge if you have a process crash you might. It's a trade off.