We have our TFS Server hosted on Windows Server 2012 R2 Standard. Recently our TFS web application started to slow down to the point that it is almost not usable. We did some digging on the server and noticed in the event logs that the TFS Service keep shutting down and restarting the shut down message is "The application is being shutdown for the following reason: BinDirChangeOrDirectoryRename" - I have checked the bin folder for the application in IIS (C:\Program Files\Microsoft Team Foundation Server 2018\Application Tier\Web Services\bin) and checked to see if any files have recent created or updated dates - nothing. I let process mon monitor the folder for the event "CreateFile" and I noted that our AV was triggering this event as it was scanning the directory (I note that the createFile event is triggered when an attempt is made to open the file with write access - I believe). Thinking that maybe this had something to do with it we stopped the AV, but the Application continues to shut down every minute or so. We did a repair on the TFS install to see if this resolved our problems. Unfortunately nothing is helping. Any suggestions as to what might be causing this issue??
2
There are 2 answers
1
On
I had major issues with this a few years back and our case it was definitely related to AV scanning and locking the folders.
After applying a few exclusions, it stopped completely.
I have finally resolved this - for anyone who is having similar problems - my solution was to add this to the web.config of the app
<httpRuntime fcnMode="Disabled" />
- using the advice given here