"The following builds cannot be cleaned" during cleanup

Hi all,

I've been trying to recover some disk space on my TC server but the cleanup task is not cleaning up the artifacts I expect it to.

My rules are set that artifacts older than the 5th build should be cleaned (pattern is +:**/*).

Some artrifacts have been cleaned correctly but fewer than I expected.

I increased the logging for the CLEANUP process to DEBUG and noticed the following in the cleanup log file:

  DEBUG -  jetbrains.buildServer.CLEANUP -The following builds cannot be cleaned: [17600, 15301, 15302, ...]
  DEBUG -  jetbrains.buildServer.CLEANUP -             These builds are referenced from: []

Unfortunately there is no more information in the logs, and the builds listed are exactly the ones that are using the most disk space.

Can I safely manually delete the folders that correspond to the builds listed in the log message?

Thanks,
JK

2 comments
Comment actions Permalink

Do you have some builds with snapshot dependencies in the queue? One reason for such logging is that builds in queue have snapshot dependencies pointing to already finished builds, and in this case these finished builds can't be removed.

0
Comment actions Permalink

Thanks for the response Pavel! I'd no builds running or queued during the cleanup.

There were around 1000 build IDs listed that couldn't be cleaned, so it added up to quite a large number of artifacts. We've been upgrading TeamCity for about 4 years now, on the same build machine, so perhaps something went awry at some point and casued this issue.

I ran a script to go through all the IDs that couldn't be cleaned and remove those artifact directories and everything seems to be OK now.

Thanks,
JK

0

Please sign in to leave a comment.