Database Space Issue

Hi Team,

we have set the Retention policy to 100 releases in Octopus life cycle. Currently we have 100 MB space on database so that Octopus is much slow in performance. tblEvent and tblDeployment history have more number of rows. Could you please advise how to delete the records in these tables.


Hi @Pradeep.Duraisamy,

Thanks for getting in touch!

If those tables are becoming too large, then the best option would be to reduce the retention policy to below 100 releases until the database is at a manageable size.
It may also be worth checking all of your projects and lifecycles to ensure that the retention policy is applied across them all.


Hi paul.calvert,

Thanks for the update. In one life cycle the retention policy was 5 releases and i could see releases are getting deleted for the project. But the deployment history table it has 60K records for that project and i am not sure why the records are not deleted in deployment history table.


How often are the release for this project deployed? Is it something that often gets deployed frequently?
If you check the entries in the deployment history table for this project do they belong to the currently existing releases?

This is a trigger that runs every minute to deploy the application. I could see the release got deleted but deployment history the data was there.

Running a deployment every minute will result in an extremely large number of entries in the deployment history table, like what you’re seeing.

It may be worth considering whether this is something that could be moved to a Runbook instead?

Thank you. I will check with the runbook.

Is there any way to delete the data in deployment history and table events

We don’t recommend deleting data from the database directly, but, if you are certain that these records are for releases that don’t exist anymore then you could remove the rows.

Obviously, ensure you take a backup of the database first, so, that you are able to perform a restore if anything does go wrong.

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.