Ishan Anilbhai Koradiya
08/21/2024, 1:22 PMPREFECT_API_SERVICES_CANCELLATION_CLEANUP_ENABLED
to False ?Marvin
08/21/2024, 1:22 PMPREFECT_API_SERVICES_CANCELLATION_CLEANUP_ENABLED
to False disables the Cancellation Cleanup service in Prefect. This has a few implications:
1. Disabling Cleanup: Improperly cancelled flow runs may not be cleaned up, leading to potential issues with run states not being updated correctly.
2. Database Locking: There have been issues reported where the Cancellation Cleanup service locks the database, especially with a high number of flow runs. Disabling this service can alleviate such problems.
For more information:
- Prefect Documentation: Cancellation Issues
- GitHub Issue: CancellationCleanup service locking up DB
The decision to disable this service should consider the trade-off between potential database performance issues and the correctness of flow run cancellations.Ishan Anilbhai Koradiya
08/21/2024, 1:32 PMMarvin
08/21/2024, 1:32 PMPREFECT_API_SERVICES_CANCELLATION_CLEANUP_LOOP_SECONDS
setting controls the interval, in seconds, at which the Cancellation Cleanup service checks for and cleans up cancelled flow runs.
For more context:
- GitHub Issue discussing database locking caused by frequent cleanup: CancellationCleanup service locking up DB
Reducing the frequency can help alleviate database load but may delay the cleanup of cancelled flow runs. You should balance this setting based on your application's requirements and database performance.