<@ULVA73B9P> i'm running a python script with a de...
# ask-marvin
a
@Marvin i'm running a python script with a deployment and also a worker.. with scheduled flows.. it seems like both are trying to run the same task every 30s? why?
m
It seems like you're experiencing duplicate task execution with your Prefect setup. Here are a few potential reasons and solutions for this issue: 1. Multiple Workers: If you have multiple workers running, they might be picking up the same scheduled tasks. Ensure that your workers are correctly configured to prevent this overlap. 2. Scheduler Configuration: The Prefect Scheduler creates flow runs and places them in a Scheduled state, but it doesn't execute them. Make sure your scheduling settings aren't inadvertently causing multiple runs to be created. You can adjust these settings using the
prefect config view --show-defaults
command. More on scheduling can be found here. 3. Concurrency Issues: There might be issues if you're using task runners that don't support concurrent runs. Ensure that your task runners can handle concurrent executions without duplicating tasks. Prefect 3.x has improved handling for task runner concurrency. 4. Known Issues or Bugs: There are known issues with duplicate task execution in certain scenarios. For example, issues with pausing and resuming tasks or using specific integrations like Ray or Dask can cause duplicate submissions. Reviewing the issue tracker on GitHub might provide insight if your situation matches a known bug or issue. You might want to review your deployment and worker configurations to ensure they align with these points. If the problem persists, consider checking the Prefect GitHub issues for similar cases or reporting your specific case if it seems unique. Here are some related GitHub issues that might be relevant: - Duplicate task execution - Concurrency handling improvements If you need further assistance, feel free to provide more details about your deployment and worker setup.