Internal Error Ese could not be initialized
Asked Answered
L

4

13

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)

Loyce answered 2/10, 2014 at 7:8 Comment(1)
We increased logging and found an access denied to a file. Will pursue that.Loyce
L
3

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.

Loyce answered 31/10, 2014 at 9:10 Comment(0)
R
12

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.

Rochette answered 15/5, 2015 at 15:26 Comment(1)
I didn't find an orphaned devenv.exe process as Anoop describes, but restarting Visual Studio did the trick for me.Agglomerate
M
3

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

Maltreat answered 2/10, 2014 at 7:52 Comment(1)
Thank you, I have read that page but there are no errors in the log.. Both types give the error..Loyce
L
3

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.

Loyce answered 31/10, 2014 at 9:10 Comment(0)
P
2

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

Plaintive answered 28/11, 2019 at 11:17 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.