Intermittent "channel closed" errors when using `pypiserver` with high levels of concurrency
When testing against a local pypiserver, uv errors with
error: error sending request for url (http://localhost:3141/simple/albatross/): channel closed
Caused by: channel closed
This is resolved by limiting parallelism of the test threads. There are no errors in the server logs.
Looks like this may be an upstream issue:
- https://github.com/seanmonstar/reqwest/issues/1221
I'm hitting this error a lot when installing from a local server.
This is resolved by limiting parallelism of the test threads.
What is the appropriate way to limit the number of threads here please? :) I'd be happy to make things a bit slower to resolve this issue.
Sorry you're hitting it. I kind of think it's a pypiserver bug, I haven't seen this elsehwere.
For limiting concurrency, see #3493 — we're about to release UV_CONCURRENT_DOWNLOADS for this purpose.
Ah, thank you! Indeed that seems to resolve things for me.
For the sake of any future readers: in my case the local server is an implementation I control. For reasons that are a little beyond my ken, switching the implementation from http.server to flask also seems to have resolved this issue (without needing to restrict uv's concurrency).