Hi everyone, We're self-hosting the Prefect serve...
# ask-community
o
Hi everyone, We're self-hosting the Prefect server with PostgreSQL as the database. Does the Prefect server manage database retention and cleanup automatically? We're noticing high CPU usage, likely due to cancellation cleanup. I suspect this process is resource-intensive, especially with six months of flow history that no one needs. Should we configure our own DB cleanup for PostgreSQL, or does the server handle it? Thanks!
b
Hi Oz! To my knowledge, Prefect server doesn't have any auto clean-up features at the moment. You'd need to implement your own cleanup process to address this. You could write a script that periodically checks for data older than 50+ days, and then deletes those records. 🤔 The REST API may be helpful for that.
🙏 1