10
votes

we get this error intermittently on all of our builds. Starting the same build again it runs OK with no errors. What does it mean, anyone knows?

msbuild arguments (some builds have UpdateDatabase=False and some have UpdateDatabase=True):

/p:GenerateProjectSpecificOutputFolder=true /p:MSBuildMultiProc=false /t:Build /t:Publish /p:SqlPublishProfilePath=Publish\XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.publish.xml /p:UpdateDatabase=False

Thank's in advance!


Summary Release | Any CPU 1 error(s), 8 warning(s) $/XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.sln - 1 error(s), 8 warning(s) h:\XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.publish.sql (0): Internal Error: Ese could not be initialized. Other Errors 1 error(s) Exception Message: MSBuild error 1 has ended this build. You can find more specific information about the cause of this error in above messages. (type BuildProcessTerminateException) Exception Stack Trace: at System.Activities.Statements.Throw.Execute(CodeActivityContext context) at System.Activities.CodeActivity.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager) at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation)

4
We increased logging and found an access denied to a file. Will pursue that.SAS

4 Answers

8
votes

I had the same issue today. Closed all instances of Visual Studio (2012). Also, opened the Windows Task Manager and found that there was still one instance of devenv.exe running and using exceptionally high memory. Closed that one too (End Process Tree). Restarted VS. There was still one project that showed 'Unavailable'. Right-clicked on that project, and added it. This resolved the issue for me.

3
votes

I can't comment yet, sorry!

Ese is the windows storage engine so it is having trouble reading or accessing a file, do you have any errors in the application event log from ESENT?

Have a look at:

http://simonlearningsqlserver.wordpress.com/2014/04/23/internal-error-ese-could-not-be-initialized-when-performing-a-schema-compare-in-ssdt/

"some builds have UpdateDatabase=False and some have UpdateDatabase=True" - are the ones that fail set to one and the ones that work set to another or is it truely intermittent?

ed

3
votes

After some experimenting it seems that adding /m:1 to msbuild gets rid of the problem.

We get no more ESE errors with this setting.

"Specifies the maximum number of concurrent processes to use when building. If you don't include this switch, the default value is 1."

For some reason the default value was not enough for us.

I'm posting it here if anyone needs it.

1
votes

For me I think this was caused because I had enabled parallel builds and we have more than one database project some file was locked by one process which caused an error in the other.

The option is Tool -> Options -> Projects and Solutions -> Build and Run -> maximum number of parallel project builds