7

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)

Mifeet
  • 12,949
  • 5
  • 60
  • 108
SLimke
  • 291
  • 1
  • 3
  • 11
  • 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 Apr 23 '15 at 21:01
  • "You have 44 active projects with 258 build configurations (plus 19 archived build configurations)." Disk usage for all projects: free space: 6.33 GB, total artifacts: 480.8 GB, total logs: 3.01 GB. I can clearly identify one project that takes 75% or disk space usage. most space is used by artifacts. in this project i have a compile build step that publishes artifacts. other following build steps like "unittest" have got an artifact dependency. – SLimke Apr 24 '15 at 05:49
  • my settings are: artifacts/history/everything -> clean up older than 5th successfull build with "do not prevent clean up" + Manage clean-up rules for: root project – SLimke Apr 24 '15 at 05:55
  • in clean up log i see: [2015-04-24 05:07:35,575] INFO - jetbrains.buildServer.CLEANUP - Applying 'clean everything' policy [2015-04-24 05:07:35,575] INFO - jetbrains.buildServer.CLEANUP - Processing removed build configuration with id bt375 [2015-04-24 05:07:35,575] INFO - jetbrains.buildServer.CLEANUP - Applying 'clean everything' policy [2015-04-24 05:07:35,575] INFO - jetbrains.buildServer.CLEANUP - Processing removed build configuration with id bt376 [2015-04-24 05:07:35,575] INFO - jetbrains.buildServer.CLEANUP - Applying 'clean everything' policy – SLimke Apr 24 '15 at 06:04
  • 1
    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 Apr 24 '15 at 14:27
  • i only configured the root project and every other project is using this setting "do not prevent artifacts clean-up". – SLimke Apr 29 '15 at 07:19
  • The big projects build step "compile" is publishing artifacts. The later coming build step "unittests" has got an artifacts dependency "from the same build chain". I guess that's why artifacts are still kept on hard disk? no builds are pinned. – SLimke Apr 29 '15 at 07:28
  • perhaps it is usefull to delete artifact dependency of later build step (unittest) and let the build step check out only certain projects from vcs like "+:MY_PROJECT.Test.*/bin/Release/**/* => ." ? So i would not have an artifact dependency that holds up all the artifacts and this would lower disk space usage? – SLimke Apr 29 '15 at 07:47
  • Is it possible to delete artifacts from file system to free up disk space? – SLimke Apr 29 '15 at 07:53
  • 2
    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 Apr 29 '15 at 08:27
  • 1
    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 Apr 29 '15 at 08:50
  • It might be worth trying Jetbrains/Teamcity forums at this point, it's very hard to determine what might be wrong without actually seeing all your settings. – Nanhydrin Apr 29 '15 at 09:02
  • 3
    Hi @SLimke, I was just looking around for clean-up assistance for myself and [I found this, which looks very much like your issue](http://stackoverflow.com/questions/11459319/teamcity-no-clean-up-for-certain-configuration-no-pinned-builds-no-dependent) – Nanhydrin Aug 13 '15 at 14:16

1 Answers1

0

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.

Jonatan Dragon
  • 4,675
  • 3
  • 30
  • 38