Another question I recently get the Warning of "Ca...
# ask-community
c
Another question I recently get the Warning of "CancellationCleanup took x seconds to run, which is longer than its loop interval of 20.0 seconds" Why does it happens? How can I fix it? Is increasing the PREFECT_API_DATABASE_TIMEOUT env var can help? Maybe something else? Tnx
m
Is this issue happening when you try to manually cancel a flow run inside the UI?
I would try increasing this env variable first, this is the actual 20 second threshold used to trigger the warning you're seeing. As far as why this is happening, it's possible that your DB is being locked by the cleanup. https://docs.prefect.io/latest/api-ref/prefect/settings/#prefect.settings.PREFECT_API_SERVICES_CANCELLATION_CLEANUP_LOOP_SECONDS
c
I'll check it, thanks!!