Skip to content
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

Connection pool is full, discarding connection: pypi.org. Connection pool size: 10 #8469

Closed
4 tasks done
jmgilman opened this issue Sep 26, 2023 · 3 comments · Fixed by #8559
Closed
4 tasks done

Connection pool is full, discarding connection: pypi.org. Connection pool size: 10 #8469

jmgilman opened this issue Sep 26, 2023 · 3 comments · Fixed by #8559
Labels
kind/bug Something isn't working as expected status/triage This issue needs to be triaged

Comments

@jmgilman
Copy link

  • I am on the latest stable Poetry version, installed using a recommended method.
  • I have searched the issues of this repo and believe that this is not a duplicate.
  • I have consulted the FAQ and blog for any relevant entries or release notes.
  • If an exception occurs when executing a command, I executed it again in debug mode (-vvv option) and have included the output below.

Issue

It seems there's been a long-running issue when using Poetry to install dependencies on a machine with a large number of cores. Specifically, when installing, the following message is spammed many times (depending on the number of cores):

Connection pool is full, discarding connection: pypi.org. Connection pool size: 10

It appears to be related to exceeding the default connection pool size of urllib3 which is 10. I would expect Poetry to set this value to at least be equal to the number of workers being used. As it stands, the only workaround is :

poetry config installer.max-workers 10

Is there a technical reason why this issue cannot be resolved? I've seen the above "fix" in dozens of projects. Why has it not been addressed? If there is a technical reason, why not hard code the max worker limit at 10?

@dimbleby
Copy link
Contributor

this is just a benign warning, I expect no-one has found it worthwhile to do anything about it

if it bothers you, then probably a merge request tidying it up would be accepted

@florczakraf
Copy link

It seems to be related to the HTTPRepository not setting Authenticator's pool_size, which then defaults to 10 (which is usually smaller than than os.cpu_count()+4 that's used as a default value for installer.max-workers).

Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/bug Something isn't working as expected status/triage This issue needs to be triaged
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants