https://prefect.io logo
r

Rio McMahon

03/10/2022, 10:33 PM
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

Kevin Kho

03/10/2022, 10:35 PM
Hi @Rio McMahon, this is a good place to start
👍 1
r

Rio McMahon

03/11/2022, 4:31 PM
@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

Kevin Kho

03/11/2022, 4:37 PM
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

Rio McMahon

03/11/2022, 4:39 PM
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

Kevin Kho

03/11/2022, 4:40 PM
You would need to supply a task definition that contains those to the agent because those are not exposed on the agent side
r

Rio McMahon

03/11/2022, 4:41 PM
Alright, thank you for the clarification
k

Kevin Kho

03/11/2022, 4:44 PM
Of course!
6 Views