I have a flow that appears to time out during a le...
# prefect-community
r
I have a flow that appears to time out during a lengthy sql query with an error message
No heartbeat detected from the flow run; marking the run as failed.
. The SQL query takes ~45 seconds to run on my local machine so I am curious what interval the zombie killer process polls at and if you have any suggestions for debugging this interruption. The flow/associated scripts run fine on my local machine. Thanks.
k
Hi @Rio McMahon, this is a good place to start
👍 1
r
@Kevin Kho Just to clarify something related to this - if I set:
Copy code
ECSAgent(env_vars={'cpu':'1024', 'memory':'8192'}
Does that accomplish the same thing as setting
Copy code
ECSRun(cpu='1024', memory='8192')
the documentation (https://docs.prefect.io/api/latest/agent/ecs.html#ecsagent) says that
env_vars
is "A dictionary of environment variables and values that will be set on each flow run that this agent submits for execution." Just want to make sure I am interpreting that correctly
k
I don’t think this is the same. ECSRun sets those on the task definition. ECSAgent env sets those as env variables inside the flow container, which is already created with cpu and memory by that point
r
Alright. I would like to globally set cpu/memory for my flows - is this possible? Basically instead of setting it at the flow level via
ECSRun(cpu='1024', memory='8192')
is there some other place to set that?
k
You would need to supply a task definition that contains those to the agent because those are not exposed on the agent side
r
Alright, thank you for the clarification
k
Of course!