Skip to content

UV fails to fetch during concurrent downloads #12054

Description

@nithish-b

Question

We in our project recently upgraded the uv version from 0.4.9 to 0.5.30.
The uv commands which worked with 0.4.9 started failing and could work only when the the concurrent downloads is limited by setting the variable UV_CONCURRENT_DOWNLOADS to 4.
This reduces the overall performance of uv and sometimes the package installation still fails and the UV_CONCURRENT_DOWNLOADS has to be set to 1.
We are behind a corporate proxy and we have several internally hosted python package index repositories in Artifactory which has to be queried during package installation.

I share here the example command for one package when the default value of UV_CONCURRENT_DOWNLOADS is used and also attached the detailed logs.
I have used the dummy index url just to get an idea what are we actually doing and the number of repositories to be queried to fetch a matching version.

Example Command

uv pip install twine \
--index-url https://pypi.org/simple \
--extra-index-url https://artifactory.com/artifactory/api/pypi/pypi-local-2/simple \
--extra-index-url https://artifactory.com/artifactory/api/pypi/pypi-local-3/simple \
--extra-index-url https://artifactory.com/artifactory/api/pypi/pypi-local-4/simple \
--extra-index-url https://artifactory.com/artifactory/api/pypi/pypi-local-5/simple \
--extra-index-url https://artifactory.com/artifactory/api/pypi/pypi-local-6/simple \
--extra-index-url https://artifactory.com/artifactory/api/pypi/pypi-local-7/simple \
--extra-index-url https://artifactory.com/artifactory/api/pypi/pypi-local-8/simple \
--extra-index-url https://artifactory.com/artifactory/api/pypi/pypi-local-9/simple \
--extra-index-url https://artifactory.com/artifactory/api/pypi/pypi-local-10/simple \
--extra-index-url https://artifactory.com/artifactory/api/pypi/pypi-local-11/simple \
--extra-index-url https://artifactory.com/artifactory/api/pypi/pypi-local-12/simple \
--extra-index-url https://artifactory.com/artifactory/api/pypi/pypi-local-13/simple \
--index-strategy unsafe-best-match -vv

Error

error: Failed to fetch: `https://artifactory.com/artifactory/api/pypi/pypi-local-8/simple/jaraco-functools/`
  Caused by: error sending request for url (https://artifactory.com/artifactory/api/pypi/pypi-local-8/simple/jaraco-functools/)
  Caused by: client error (SendRequest)
  Caused by: connection error
  Caused by: stream closed because of a broken pipe

The error differs for every run here the error is throw failing to fetch jaraco-functools but this can be a different package in next run.

PS: We have several internally hosted python repositories in Artifactory and we install around 300 packages in our docker container.
We use the commands uv pip compile to generate requirements.txt, uv sync to update the uv cache and uv pip install for dependency package installation while running nox build.
Also important to note that the package from internet can also be installed.

uv_verbose.log

Platform

Linux 5.4.0-204-generic x86_64 GNU/Linux

Version

uv 0.5.30

Metadata

Metadata

Assignees

No one assigned

    Labels

    networkNetwork connectivity e.g. proxies, DNS, and SSLquestionAsking for clarification or support

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions