Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

It depends. Maybe you aren't closing the sockets properly (shutdown + close). Or maybe, because of how TCP works, the sockets are stuck in timeouts and don't really close for a long period of time. If its something like that, then your old connections aren't really closing, and new ones can't be created.

Or maybe it's a simple problem of aiohttp performance -- as shown in the blog post, its HTTP parser is a bit slow.

In general, I'd recommend to use a fewer number of sockets and implement some pipelining of API requests.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: