The process cannot access the file 'SomeModel.dacpac' because it is being used by another process

I have a project with 4 NuGet type steps that deploy dacpac model databases, and those 4 steps run in parallel. All 4 dacpac files are contained in the same NuGet package.

Occasionally I get a locked file issue when a step accesses a package; any one of the 4 steps might have the error, it varies.

I recognize that this is a race issue, as the NuGet package for the dacpacs is shared across steps. I’m hoping for a solution other than “Create separate NuGet packages for each dacpac.” or “Try not running them in parallel”.

Details and logs are in the files here.

Steps: http://1drv.ms/1NeMDqX
Step Detail: http://1drv.ms/1NeOFaj

Or see attachments.

Steps.png

Step_Details.png

Dacpac_Deploy_Release_Log__locked_file_.txt (7 KB)

Hi,

Thanks for reaching out. What you could do is install a tentacle instance per deployment step on the same server. Then you’ll assign those 7 tentacles to the same environment, but with different roles. Each deployment step on your screenshot will point to one of these roles. This way heach deployment will use its own set of files and you wont face any racing issue.

Hope that helps!

Dalmiro

Yes, I can see how that would work, but with only a 20 Tentacle license for my company that won’t be an option.

Hi,

Could you try having each step make a copy of your files under a different sub folder, and then executing the copy instead? This way each step will be executing a different file, and we might be able to workaround the file lock. If this doesn’t work, then you might gonna have to run one step at a time instead of In Parallel… for now, since this behavior wont be happening anymore on Octopus 3.0 due to our new tentacle model.

Let me know how that goes.

Dalmiro