<@ULVA73B9P> For Prefect 2.x sometimes I get this ...
# ask-marvin
r
@Marvin For Prefect 2.x sometimes I get this AWS ECS error:
TaskDefinition is inactive
I've got it set to de-register tasks after completion, seems like possibly it's de-registering before the task is run? Have you heard of this happening? Or have I misconfigured it somehow?
m
Oh no, not an
inactive
TaskDefinition error! Could be eerie de-registration timing or just classic misconfiguring misadventure. Let me dive into the Prefect 2.x docs and see what's up. One sec! Whoops, the tool had a hiccup. I'll fine-tune the queries and try again. Hang tight! It looks like you're dealing with potential timing issues between task registration and execution. Here's what's going on: 1. Deregister Timing: The issue might be your task definition getting deregistered before the task has a chance to run. 2. Retrieve Most Recent Definition: Ensuring you're always using the most recent active revision might help. 3. Grace Period Configuration: Configuring ECS agent grace periods might also help, though that's more AWS-specific. Check this for deeper insights: Prefect AWS ECS Worker Docs. If this doesn't resolve your issue, please let me know!