Hi. I have a prefect flow, that has a task (among others) that execute several commands in a EC2 Instance. The thing is that task takes about 3 or 4 days to finish, but when it has been running for 12 hours, it crashes because of timeout. Is this an expected behavior ? Does prefect tasks supports executions over that time? Is there a way to keep running it?
k
Kevin Kho
11/03/2021, 5:38 PM
I don’t think this is expected on the Prefect side and you have have long executions. Are you using boto3 and does boto3 have a default timeout? Is it exactly 12 hours?
Kevin Kho
11/03/2021, 5:39 PM
What is the use case that takes a while? Maybe if you give more details, we can find a way to make this work?
s
Santiago Gonzalez
11/03/2021, 5:40 PM
It takes too long, because of the script we are running. That time is expected, since we have too many data to process. I will check boto3 timeout.
k
Kevin Kho
11/03/2021, 5:43 PM
Is it a single task that takes 3 to 4 days?
s
Santiago Gonzalez
11/03/2021, 5:44 PM
Yes, it is
k
Kevin Kho
11/03/2021, 5:46 PM
On the Prefect side, it can die from memory running out. What is your error message?
a
Anna Geller
11/03/2021, 5:51 PM
@Santiago Gonzalez you can try setting the flow’s heartbeat mode to thread on your run configuration for that job. I tested this today with a long running Spark job and it helped with that. But, as Kevin mentioned not sure if this will work for a job that runs for days, but it’s worth trying:
Bring your towel and join one of the fastest growing data communities. Welcome to our second-generation open source orchestration platform, a completely rethought approach to dataflow automation.