-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Client sometimes fails with httpx.LocalProtocolError
#7442
Comments
Thanks for the well written bug report! We'll see what we can find out about the cause. |
Possibly related: python-hyper/h2#1199 |
I think I am seeing this when an agent is finishing processing a flow that it has pulled down from a work queue.
|
Hi @tjgalvin, this issue is specifically for the |
Sigh -- of course it was me that found a new problem :P Sorry for my confusion. I can definitely open up a new issue, but I am afraid I would not be able to provide a MWE to replicate the issue at the moment. |
Hi ,I'm running a parent flow that maps the parameters into 8 deployments runs. All deployments runs correctly but when it finish fails and the subsequent flow cannot be triggered.
|
Got it today. Running K8s through Docker Desktop. I was cleaning stuff up and then looked back in my terminal and saw the traceback. The job wouldn’t have been running more than 3 minutes.
|
This is impacting us as well |
We're adding #7802 to allow HTTP2 to be disabled when this issue persists. |
|
Hi @madkinsz , I'm running prefect 2.7.7 and had the same problem several times today and yesterday. The Prefect agent runs on an EC2 machine and runs an ECS Fargate Task. The error I got was : "httpx.LocalProtocolError: Invalid input ConnectionInputs.SEND_HEADERS in state ConnectionState.CLOSED". Do you know how I could fix this please ? Any help would be greatly appreciated :) |
Ok great thank you very much ! |
FYI I was having the same issue with Prefect 2.10.6 earlier today |
@MattDelac please include the debug logs as described in #7442 (comment) |
Also been facing this issue for the past couple of days, even on v2.10.6. Longer-running flows just get stuck and their respective containers seem to get killed on the same ECS cluster. I will attach the agent debug logs after enabling it for a while. |
PrefectHQ/prefect#7442 encode/httpx#2112 considering that the above two issues mean that using `http2: false` leads consistently to irrecoverable worker failures, I think the default should be false
@madkinsz the issue popped up again crashing the agent. But thankfully we have better logs now. Attaching them here for your reference. In the meanwhile, is there anything we can do to temporarily fix this issue? My flows keep hanging whenever the agent restarts. Would downgrading to some other version potentially fix this? |
@MohammedSiddiqui you can disable HTTP2 as described a few times above. |
Unfortunately I'm not seeing much valuable context from the
|
Yes I will add the debugging. But FYI it failed again for no reason ... 😢 This is very frustrating [EDIT] Just added |
I don't know if the |
And @madkinsz there is no log since the agent started even when using the following command |
If you disable HTTP2 there is no reason to collect httpx/httpcore logs. We already know this issue is resolved by disabling HTTP2. For others, I presume you'd also want to set |
The debug just shows that my agent thinks it's connected but Prefect Cloud thinks my agent is not ... |
This comment was marked as off-topic.
This comment was marked as off-topic.
I'm seeing similar httpx errors while using 2.10.6. I'm using Docker on EC2 for my agent queues. I'll try to set
|
This is a separate issue, please open a question in the Disabling HTTP2 will definitely resolve those errors. Please consider collecting httpcore/httpx debug logs for us first! |
This comment was marked as off-topic.
This comment was marked as off-topic.
I'm also experiencing this issue running my agent on ECS Fargate. Will try to get some logs too |
httpcore logs
|
Here's a new one for
https://basedbin.fly.dev/p/ThNogZ.txt And additional logs that include displays of the H2 Events processed |
Drafting a solution at encode/httpcore#679 |
Got this issue today on Prefect 2.8.7: main error: Full trace:
I'll try setting the |
With the latest httpcore release my fix is available upstream.
to resolve. |
First check
Bug summary
Occasionally it seems agent is not able to retrieve the jobs to run from Prefect Cloud. It may be hours until the issue appears.
The problem had been discovered, when we received a "Late" scheduled flow notification and consequently by checking the agent logs.
The error appeared the same day we upgraded from 2.4.0 to 2.6.5 via pip.
Prefect slack thread for reference
Reproduction
Error
Versions
Additional context
output of
pip install prefect==2.6.6
The text was updated successfully, but these errors were encountered: