Build Agent Artifacts Cache Cleanup

Answered

Hello,

I've just checked my TeamCity folder and noticed that it's size just keeps growing even though cleanup is performed. After some investigation I found that the build agent's artifacts cache is the main culprit:

C:\TeamCity\Installation\buildAgent\system\.artifacts_cache

All my build artifacts are still there for all past builds which amounts to a lot of data and will quickly grow into a problem. My questions are:

  • Is there a way to automatically get this cleaned up so that older build artifacts are removed (similar to build history cleanup)?
  • Can I just manually delete not required folders in the cache?


Thanks for your help!

Mike

6 comments
Comment actions Permalink

Hi Sergey,

Thanks for you reply. Unfortunately when I click the link I get a page not found error? Any chance you could copy and paste the content?

Thanks,

Mike

0
Comment actions Permalink

Here you are:

Agent artifacts cache properties

teamcity.agent.filecache.flush.interval.ms - interval of periodic flushing cache state to disk (defaults to 7000 ms)
teamcity.agent.filecache.expiration.time.ms - cache entry expiration time. If an entry is oldre than that, it is re-fetched even if its metadata has not changed. Value "0" is equivalent to teamcity.agent.filecache.override=0, value less than "0" is equivalent to "forever" (Long.MAX_VALUE) (defaults to 48 hours)
teamcity.agent.filecache.size.limit.bytes - cache size limit. unlimited if 0 or less (0 by default)
teamcity.agent.filecache.override - always download cached entities (ignoring metadata state)
teamcity.agent.filecache.publishing.disabled - disable publishing to artifacts cache

0
Comment actions Permalink

Hi, 

where should I add these properties?

 

Thanks,

Rodrigo

0
Comment actions Permalink

conf/buildAgent.properties

0
Comment actions Permalink

Hi,

I tried to set teamcity.agent.filecache.size.limit.bytes to limit cache size, tried to set teamcity.agent.filecache.publishing.disabled = true to disable caching altogether, restarted TeamCity service but nothing worked. Any further suggestions?

Fragment from properties file:

system.teamcity.agent.ensure.free.space = 10gb
teamcity.agent.filecache.publishing.disabled = true
system.teamcity.agent.filecache.publishing.disabled = true

 

Using TeamCity Professional 9.0.5 (build 32523)

0

Please sign in to leave a comment.