04/12/2023, 12:00 PM
Hi everyone. I’m evaluating Prefect for our company. I’m running a Prefect agent in a Docker container on Azure Container Instances. When I leave the agent idle overnight, the next day I find it ‘stuck’ with a log full of stack traces similar to this:
Failed the last 3 attempts.  Please check your environment and configuration.
Examples of recent errors:

Traceback (most recent call last):
  File "/opt/conda/envs/prefect/lib/python3.10/site-packages/h2/", 
line 224, in process_input
    func, target_state = self._transitions[(self.state, input_)]
KeyError: (<ConnectionState.CLOSED: 3>, <ConnectionInputs.SEND_HEADERS: 0>)

During handling of the above exception, another exception occurred:
The agent doesn’t accept any flows to execute. The only thing I can do is to restart the agent container. Does anyone know what the issue might be, and how to solve it or work around it?

Christopher Boyd

04/12/2023, 4:46 PM
Hi Gosia, try adding
to your env variables for the agent is open for the core issue itself, the env variable allows it to be disabled


04/13/2023, 7:27 AM
Hi Christopher, thanks for you tip. I’ve started the agent with this extra env variable. I will check tomorrow if this resolved my issue.