This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author chenzhuowansui
Recipients chenzhuowansui
Date 2021-05-24.08:11:43
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1621843903.65.0.777686140442.issue44155@roundup.psfhosted.org>
In-reply-to
Content
After some investigation, i almost finally identified the root cause - it was caused by the following line in `Server` class in `manager.py` file:
```
self.listener = Listener(address=address, backlog=16)
```
i'm not sure where the magic number `16` came from, but it turned out it was not big enough for some powerful CPU(48 cores in my case), where the socket server starts refusing to accepting new connections if there are more than `16` unaccepted connections, i think this is why the code stuck at `Client -> answer_challenge` where attempting to create new connection to the server. After i change the number to `32`, this issue is gone.
IMO, a magic number here is not very suitable, maybe we could make this number configurable or use `cpu_count` to set it to a better number based on the CPU count.
History
Date User Action Args
2021-05-24 08:11:43chenzhuowansuisetrecipients: + chenzhuowansui
2021-05-24 08:11:43chenzhuowansuisetmessageid: <1621843903.65.0.777686140442.issue44155@roundup.psfhosted.org>
2021-05-24 08:11:43chenzhuowansuilinkissue44155 messages
2021-05-24 08:11:43chenzhuowansuicreate