Amir Kamal
07/08/2025, 7:37 AMMarvin
07/08/2025, 7:37 AMMarvin
07/08/2025, 7:38 AM.submit()
or .map()
, make sure to call .wait()
or .result()
on the returned futures
- Example of correct usage:
python
@flow
def my_flow():
future = my_task.submit()
# Make sure to wait for the result
result = future.wait() # or future.result()
2. Infrastructure Issues
- Check if your worker/agent is running and properly connected
- Verify that your infrastructure (Docker, Kubernetes, etc.) has enough resources
- Look for any authentication or connectivity issues in your logs
3. Concurrency Configuration
- While you have a global concurrency limit of 6 and only 2 flows running, check:
- Work queue concurrency limits (these can override global limits)
- Task runner concurrency settings
- Infrastructure-specific limits (e.g., Docker container limits)
To diagnose the issue:
1. Check your flow logs for any error messages, particularly:
- "A future was garbage collected before it resolved"
- Authentication or connection errors
- Import or dependency errors
2. Verify your deployment configuration:
- Ensure all required dependencies are included
- Check that your infrastructure block is properly configured
- Confirm your work queue settings
Would you be able to share:
1. A simplified version of your flow code?
2. The deployment method you're using?
3. Any error messages from the logs?
This would help me provide more specific guidance for your situation.
Relevant documentation:
- States in Prefect
- Global Concurrency Limits