Tentacle retaining system lock on file it's trying to update

Hi,

Ran into a strange series of errors whilst deploying a windows service. I had some issues with certain assets not being deployed, which caused the release to fail whilst trying to start the windows service. I fixed the error and deployed a new release against however the Tentacle was retaining a lock on one of the files it was previously trying to deploy, therefore preventing the release from working.

I restarted the Tentacle and the release went through OK. Is this a known issue or something new? I can post more info shortly or send it over should that be of use??

Thanks

Hey Tim,

Thanks for letting me know.

When Tentacle executes a PowerShell script, it does it using a separate AppDomain within the same process (powershell is hosted). If your script takes a handle to a file and for whatever reason doesn’t release it, then Tentacle will retain the handle.

I’ll see if there’s a way to clean up these handles, and if not I’ll consider an architecture change, perhaps using a separate process temporarily to run the script.

In the mean time you could have your Deploy.ps1 invoke PowerShell.exe with a different script to run - this will isolate the process and ensure any handles are released.

Paul

Sent from my Windows Phone


From: Tim Peel
Sent: 10/10/2012 17:47
To: Paul Stovell
Subject: Tentacle retaining system lock on file it’s trying to update [Problems #744]