7
votes

Our TeamCity server is running for about 3 years now and every artifacts is saved on hard disk. the hard disk now is almost full.

I looked into the clean up rules and there is:

Everything older than the 5th successful build
History older than the 5th successful build 
Artifacts older than the 5th successful build; artifact patterns: +:**/*
Do not prevent dependency artifacts cleanup

I would assume that all history, all artifacts etc. older than the fifth build will be deleted. But it is not. Build server is still having 476.18 GB of total memory.

What did I do wrong?

Thank you for reply.

edit: using TeamCity Enterprise 8.1.5 (build 30240)

1
When you look at Administration> Disk Usage, what's the breakdown? How many projects and build configurations do you have? Is there any one that's much bigger than the rest? What's making up the bulk of the disk usage, artifacts or logs as shown in the columns?Nanhydrin
OK, and for the big project, looking at the Project settings> Clean-up rules; are you sure none of them have Prevent dependency artifacts clean-up? If you look at one of the configurations that you expect to be cleaned up, and look at the Build Chains tab, does that give you any clue as to why it's holding on to the artifacts? And separately, are any of the builds pinned because that will prevent clean-up?Nanhydrin
Yes, you can manually delete items from the file system. TeamCity doesn't seem to store the file information in the database. Adding screenshots of what you're describing to your might help, because when you say the build step publishes artifacts I'm confused, build steps don't normally publish, build configurations do.Nanhydrin
thx! that helps me for the moment and the build server queue is running again! but it doesnt solve my general problem which is that too many artifacts are still saved on disk. what i mean is that the build step "compile" has an artifacts path in its settings.SLimke
Hi @SLimke, I was just looking around for clean-up assistance for myself and I found this, which looks very much like your issueNanhydrin

1 Answers

0
votes

I know the question is quite old, but hope the answer might help somebody.

  1. Make sure the clean up is actually run.

By default, TeamCity will start cleaning up daily at 3.00 AM. It is also possible to start clean-up manually. To clean-up go to: Administration | Server Administration | Clean-up Settings, and then run clean-up manually using the Start clean-up now button ~documentation

  1. Make sure your build succeeds. You could have some tests that do not pass for a year (please, don't :) ), like in this thread.

  2. Check server logs. More on this documentation page.