[upgrade 6.5.2] artifacts cache not always cleared

Hello,

after upgrading from 6.0 to 6.5.2 the artifacts cache is not cleared regularly. Agents do not clear the artifacts in the directory BuildAgent\system\.artifacts_cache\buildserver\httpAuth\repository\download. There is no pattern when it doesn't happen. Artifacts are being copied to the download directory until the free disk space is down to 0.

The log of the agent shows messages with 'ArtifactsCacheDirectoryCleaner' but nothing gets cleaned up.

Here an example:

[2011-07-14 15:55:50,300]   INFO - ArtifactsCacheDirectoryCleaner - Cleaning up free space in artifacts cache
[2011-07-14 15:55:50,300]   INFO - ArtifactsCacheDirectoryCleaner - Finished cleaning up artifacts cache, got 0 bytes of free space

Cleaning of the buildAgent\work directories works.

Currently we are deleting some of the oldest artifacts in the download folder of the agents manually. Can this produce any unstable behavior to the configurations?

Any help is appreciated.

Thanks,

Helios

4 comments
Comment actions Permalink

Hello Helios,

Could you please enable agent debug logging and post log entries related to artifact cache cleanup?
To enable agent debug logging you'll need to edit teamcity-agent-log4j.xml (look for statement <!--DELETE THIS LINE FOR ENABLING DEBUG LOGGING-->)

0
Comment actions Permalink

Hello Nikita,

here are the log entries having ArtifactsCacheDirectoryCleaner information:

[2011-07-22 18:36:46,110]  DEBUG - ace.DirectoryCleanerForceClean - Cleaning free space with class jetbrains.buildServer.agent.impl.cache.ArtifactsCacheDirectoryCleaner
[2011-07-22 18:36:46,110]   INFO - ArtifactsCacheDirectoryCleaner - Cleaning up free space in artifacts cache
[2011-07-22 18:36:46,125]   INFO - ArtifactsCacheDirectoryCleaner - Finished cleaning up artifacts cache, got 0 bytes of free space

Debug has been enabled 3 hours before and these are the only entries containing ArtifactsCacheDirectoryCleaner.

Free disk space at 17:46 0.27GB and at 18:45 0GB. That's on the c: drive where the agent is installed. On the d: drive the agent's work directory is being cleaned everytime the free disk space is below 3GB, as expected.

Thanks,

Helios

0
Comment actions Permalink

Thank you, Helios.

Would you mind posting full debug log? Particularly, I'm interested in DirectoryCleanerForceClean messages.

0
Comment actions Permalink

I've created a record in our issue tracker for this problem: http://youtrack.jetbrains.net/issue/TW-17766
You can watch/vote for it.

As the workaround, you can edit buildagent.properties file and add following line:

teamcity.agent.filecache.size.limit.bytes=<put desired size limit (in bytes) here>

This will bind artifacts cache to give size.

0

Please sign in to leave a comment.