-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Frequent intermittent connection failures #3219
Comments
I can confirm the same issue with Poetry 1.1.2. Every other install fails with a |
Hmm, we saw this intermittently in our own CI a while ago, but was restricted to Cirrus CI FreeBSD instances (which runs on Google Cloud). We might be able to do a bug fix to try recreate the session, but I suspect the issue might be at the process/scoket level. @winpat what environment are you seeing your errors in? I am really inclined to move http logic to |
I observed the problem in various GitLab CI pipelines (GitLab.com, not self hosted). If I remember correctly then GitLab also uses GCP. |
We are having the same issue with our CircleCI builds (poetry 1.1.2, VM with ubuntu-1604:202004-01 image and python 3.7)
|
When running under certain environment, reuse of request sessions maybe causing network connectivity issues. This change ensures that request sessions are not reused across requests. Relates-to: python-poetry#3219
I am not entirely sure if this will fix the issue, since I am assuming the real issue here is some sort of networking layer throttling being hit. If some of you can please try the fix at #3230, it would be helpful to know if session reuse across thread exeuctions was the issue here. Using pipxpipx install --suffix=@3230 'poetry @ git+https://github.com/python-poetry/poetry.git@refs/pull/3230/head' Using a container (podman | docker)podman run --rm -i --entrypoint bash python:3.8 <<EOF
set -xe
pip install -q git+https://github.com/python-poetry/poetry.git@refs/pull/3230/head
poetry new foobar
pushd foobar
sed -i /pytest/d pyproject.toml
poetry add pycowsay
# commands to reproduce your build
EOF |
@abn Thanks for your help! I've added your fix to a couple of different projects. It will take a day or two until I can whether it's working or not. |
Unfortunately I can't test it in our environment, I've turned off "new
installer" instead and that fixed the issue for us.
…On Tue, Oct 20, 2020 at 11:37 AM Aniruddha Maru ***@***.***> wrote:
@maroux <https://github.com/maroux> @winpat <https://github.com/winpat>
@dariobig <https://github.com/dariobig> can you please verify if the fix
above resolves the issue for your environments. If it does I can get that
into the next patch.
I've run it four times now and it's worked every time. I believe the PR
does fix this issue.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#3219 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAABFE553C5KZ7MJQTQMHVTSLWVEPANCNFSM4SSUHTOA>
.
|
I also ran it a couple of times without any issues so far 👍. |
This comment has been minimized.
This comment has been minimized.
i've now recognized my posts here and on the other issues were unnecesarily blunt and had a tone i dont stand for. So i apologize for my behavior and wish no harm was done. I was under stress and this was an accidental side-effect. |
@sloev as I mentioned on the pull request (#3230 (comment)), this is an open source community project, not a product you have a paid support for. This is maintained by a small group of volunteers who spend their spare time on this. You demanding issues be fixed and spamming issue threads is not going to make anything go any faster. While we can appreciate that this is causing issues with your workflow, we have mentioned in the release post how to disable the experimental installer to unblock yourself. Please keep the conversation constructive and civil. |
@DustinMoriarty yeah; we noticed that. This should go away once |
When running under certain environment, reuse of request sessions maybe causing network connectivity issues. This change ensures that request sessions are not reused across requests. Relates-to: #3219
This was resolved with |
uh-oh just saw this now on 1.1.4:
might be unrelated? |
@maroux I suspect this might be different as this is connection being broken during a download. |
We're still seeing exactly this problem on our CI builds (azure pipelines) with
Since there's a pretty big list of packages to install, this happens almost every build. We're pinning to poetry < 1.1 for now as a workaround. |
As per https://python-poetry.org/blog/announcing-poetry-1-1-0.html#brand-new-installer adding something like the following to your CI builds might work: |
Unfortunately, still experiencing this on
Base Docker image: Any workarounds? |
@danielgafni can you open a new issue for this? The workers need to be configurable. We definitely are a bit greedy, but then again I suspct what we need to connection pooling for repository sessions so installations can continue faster if all dependencies are already cached for example. poetry/poetry/installation/executor.py Line 75 in c6b19b3
|
Hello I keep getting this
When I run poetry Install, have anyone find a solution ? |
We're experiencing this issue as well very consistently in our repositories that include a link to our private Azure package feed. We've tried the solution posted above to no avail. Note this is on poetry version 1.1.12.
We've noticed that when we remove our private packages and package feed from our list, the problem goes away immediately; also dependency resolution is much much faster (in this case, from 100-300 seconds with failure, down to ~20 seconds with success). |
@abn Do you have any insights on how to resolve #3219 (comment) ? |
I have the same issue as @rbudnar with 1.1.12 with Gemfury. The failures are really uneven though sometimes it fails right away, sometimes it takes 30 secs, sometimes more. I just manage to do an install after 15-20 retries :( |
@abn I'm also still running into this, even with |
@gshpychka @mbelang can you try with poetry@master maybe? If that does not work, maybe raise a new issue? |
This happened for me in CI with a build machine with 32 cores.
|
+1 -- happening on poetry 1.1.13 in a docker container :( |
I am also still experiencing this. I have not had time to investigate further, but I am wondering if it might have to do with using a private pypi repo as an additional source? I don't seem to run into this issue when I am working on packages that don't have the |
My hunch is that it also may have to do with internet speed. I'm succeeding at 330 Mbps but my colleague is failing at 27 Mbps. I think perhaps the retries need to be more forgiving? |
I'm experiencing this as well with Poetry 1.1.13 in a docker container, and I'm don't have a private repo... |
Also seeing this frequently on our Gitlab CI/CD pipelines (running in container) with a private repo as a secondary source |
Just fyi if you haven't tried it yet: setting |
@danielgafni I've added that to our pipelines today, shame that it makes the pipelines dramatically slower (and the first pipeline we ran after it failed with the error). But hopefully it will help a bit. Out of interest are your private repos set as 'secondary = True' or not? |
@invokermain yes, it's set to true |
Yeah a few days later and we are still getting this issue very regularly, even with But having some sort of exponential backoff on the poetry side would be a good fix for this no? |
Hmmm looks like this might be resolved on 1.2, so 🤞 for a release soon! |
Still experiencing this problem on 1.2.2 |
Still experiencing this problem on 1.4.x
I think there should be a problem with the way parallel works. |
Still experiencing this problem on 1.5.1
|
Same behavior with poetry |
If you're still experiencing this, it's possible that your docker container is reporting a ton of cores (whether that is true or not, see below) when The max number of workers has no upper bound by default, meaning hundreds of connections might be attempted and this error occurs. Setting max-workers to a reasonable value, e.g. somewhere between 5 - 8, will likely resolve this. POETRY_INSTALLER_MAX_WORKERS=5 poetry install We encountered this on CircleCI - CircleCI's Python convenience image reports 36 cores regardless of which resource class you're using. |
I confirm the same issue with poetry we noticed however that this problem happens only to customers with nvidia-packages (cuda, cublas, cudnn, etc.) in the installation chain and only by building a docker image on Windows. |
I also confirmed the same issue with poetry |
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. |
-vvv
option).Issue
Environment: Docker debian slim buster image running in Google Cloud Platform Cloud Build
Installation:
poetry install -vvv --no-root --no-dev
Outcome: Fails with networking error intermittently, but frequently enough that upgrade to poetry v1.1 is blocked on solving this issue.
Notes: Older version (v1.0.9) works fine but is slow because of old installer.
Verbose logs:
The text was updated successfully, but these errors were encountered: