File lock on during automatic deployment

Tobias Beckendorff asked on February 18, 2019 15:26


Deployment of Kentico Instance (Kentico 11 web application) fails with an ERROR_FILE_IN_USE for "" (/App_Themes/Default/Images/ when using automatic deployment (ms deploy through TFS).

We have set the deploy task to put and remove an app_offline.htm, even shutting down the application pool manually prior to the deploy task does not help. What does help is shutting down the site via app_offline.htm and waiting a couple of minutes.

We are getting the error only on 1 of 2 servers in production environment (2 server webfarm), local development and staging environment are fine. This seems strange to me, since I have associated the "" with the admin ui and all our users (editors) access only the staging environment.

Has anyone encountered a similar problem with automatic deployment?

Thanks, Tobi

Recent Answers

L B answered on April 17, 2019 02:36

We are having some issues too with the being lock (not the same architecture though)

The only thing that seems working is to restart all the applications servers and re deploy. Not ideal though.

0 votesVote for this answer Mark as a Correct answer

Tobias Beckendorff answered on April 17, 2019 10:12

We use a ps script to release the handle on the file in question as a workaround. I still think kentico developers should look into it

1 votesVote for this answer Mark as a Correct answer

J Shaw answered on May 1, 2019 22:17

Yes, this happens to us. I usually login and stop the app pool before triggering the automated build. Very automated lol. Any solution for this would be great.

Thanks, John

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.