Builds always cleanup after themselves

We started to experience a strange behavior on the Teamcity Server the last 2 weeks.

All our build definitions now start with a
"Reason: Checkout directory is empty or doesn't exist"

So they dont do a "get latest"/diff anymore but clean/full checkout

So our build times went up from 1m30 or so to 9 minute.
(Those are the builds that do a deploy with robocopy and since the timestamp always changes all the files are copied over)

I notice that the working folder of the build agent like below get cleanud up *imemdiatly* after a build

But we don't have a task/buildstep that says to cleanup after itself.
Also the server is not in need of diskspace :
C: 16,7 free of 59,8
H: 12,2 free of 29,9

Since we didn't make a change to TC (we can see this from the audit) log it still seems that some threshold is reached without human doing.

We looked through the server logs but could not find a clue:


This kept us busy for 0.5 days so are interested in what the reason can be.

Thanks for your help


Comment actions Permalink

Please check conf/ for existence of property. Also, please post work/ file content.

Comment actions Permalink

\\atoma\TeamCity\buildAgent\conf\ 395 b 15/07/2013 15:12 -a--

#Generated properties (see for description)
#Tue Feb 26 16:05:50 CET 2013
#User defined properties
#Tue Feb 26 16:05:50 CET 2013


\\atoma\h$\TeamCity\buildAgent\work\ 793 b 13/05/2014 13:43 -a--

#Don't edit this file!
#May 13, 2014 1:43:35 PM CEST
bt20=CliC::Release V4.2 -> 59d10c1e2d2193ba |?| May 5, 2014 3:17:56 PM CEST |:| default
bt11=CliC::Main Nightly (Clean Checkout with no Deploy) -> dd6a2430864d0873 |?| May 13, 2014 2:00:03 AM CEST |:| default
bt8=Other::Swift -> 8211e862d78bc87f |?| May 13, 2014 2:09:11 AM CEST |:| default
bt7=Other::Toolkit.Essential NuGet Package -> 8d46ce040ed3abe2 |?| May 13, 2014 2:09:46 AM CEST |:| default
bt5=CliC::Development - Morning,Noon,Evening (Clean Checkout, Sandcastle, FxCop,  ...) -> 39dc7bc29a738d28 |?| May 13, 2014 12:15:19 PM CEST |:| default
bt13=Intranet::Intranet -> 5e17e01b6b692331 |?| May 13, 2014 1:34:12 PM CEST |:| default
bt2=CliC::Development -> 39dc7bc29a738d28 |?| May 13, 2014 1:41:00 PM CEST |:| default

I was aware of the property but its not there right.
Notice the timestamps on the file. The problem started on 22/5 and the stamps are before that.

Let me know if I can check a setting or lookup a file. Thanks for the help so far

Regards, Tom

Comment actions Permalink

build agent considers all checkout directories in working directory older than 2 weeks as expired and removes them.

The question is, though, if you ran new builds on this agent why didn't checkout dirs appear in file.

Comment actions Permalink

It was a security issue, directoty map was not writeable to the agent and the agent changed accounts 3 weeks ago or so

Would I have been able to disocver this in one of the logs?

Thanks for the help

Comment actions Permalink

I searched the logs in the teamcity folder for but could not find an occurance
I could not find a specific log file in the agent folder

Comment actions Permalink

The primary log file for agent is teamcity-agent.log.

Comment actions Permalink

yep, it was logged as a warn:

[2014-06-01 15:45:14,543]   WARN - es.DirectoryMapPersistanceImpl - Failed to save to H:\TeamCity\buildAgent\work\ H:\TeamCity\buildAgent\work\ (Access is denied)

there was also mention of the error in


Please sign in to leave a comment.