Dacpac : Version Store Out of Memory

I’m deploying dacpacs through Octopus and occasionally hitting an error during deployment. Admittedly, I am not using the community template to deploy, and can share the script if need be.

Exception calling "Deploy" with "5" argument(s): "Version store out of memory (cleanup already attempted)"

I have tried, based on some tips online, to set DACFX_MODEL_STORAGE_TYPE to “Memory”, but that doesn’t help.

This only happens when trying to deploy 2 dacpacs simultaneously from the same server, and even then only intermittently. Unfortunately, we have a large number of projects touching a small number of servers, and so we are forced to use the OctopusBypassDeploymentMutex. Until we can find a solution to worker tentacles ( http://help.octopusdeploy.com/discussions/questions/10686-run-step-once-from-a-pool-of-tentacles ) we almost need to have simultaneous deployments.

The Event Viewer shows an ESENT 623 error, which is consistent with other version store errors I’ve found online. Below is the details:

PowerShell (4600) 45e9bb18-6e70-440e-81f6-0a895a55801c: The version store for this instance (0) has reached its maximum size of 2Mb. It is likely that a long-running transaction is preventing cleanup of the version store and causing it to build up in size. Updates will be rejected until the long-running transaction has been completely committed or rolled back. 
Possible long-running transaction: 
	SessionId: 0x000000A8463208A0 
	Session-context: 0x00000000 
	Session-context ThreadId: 0x0000000000001210 
	Cleanup: 1 
	Session-trace: 
52005@11:20:23 AM
57573@11:20:23 AM

Is this a limitation that anyone else has hit? In looking online, the only thing I can find is in relation to the version store filling up from extensive AD changes, nothing from local apps. Does anyone know of a way to increase the version store?

Hi Chris,

Thank you for getting in touch. I’m unfamiliar with the error you are getting, and since it is a Dacpac error, a little out of our scope.

However, you could serialise the dacpac part of the deployment. If you are using a powershell script to initiate the deployment, you could wrap a mutex/semaphore around it.

Otherwise, you could use a file as a mutex with scripts that run before and after the deployment.

Hope that helps,

Robert W

Hey Robert,

Fair enough, I just figured I’d ask here in case anyone has hit the issue, or to see if anyone was aware of how to increase the version store.

For now I’ve setup a mutex locking for all dacpac deploys, and wile the error still occurs occasionally when multiple deployments are waiting on that server, it is far less often.

Thanks for looking into it.

-Chris