Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Failure writing to log file with RavenDB Embedded on Windows Azure

I am running an MVC web site on Windows Azure and using RavenDB embedded. If the web site is "cold" (unloaded from the Azure instance), I get the following error message on the first hit to the web site:

Server Error in '/' Application.

Failure writing to log file

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: Microsoft.Isam.Esent.Interop.EsentLogWriteFailException: Failure writing to log file

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[EsentLogWriteFailException: Failure writing to log file]
Microsoft.Isam.Esent.Interop.Api.Check(Int32 err) +21
Microsoft.Isam.Esent.Interop.Api.JetInit(JET_INSTANCE& instance) +23
Raven.Storage.Esent.TransactionalStorage.Initialize(IUuidGenerator uuidGenerator, OrderedPartCollection`1 documentCodecs) +309

[InvalidOperationException: Could not open transactional storage: C:\DWASFiles\Sites\reflix\VirtualDirectory0\site\wwwroot\App_Data\Data] Raven.Storage.Esent.TransactionalStorage.Initialize(IUuidGenerator uuidGenerator, OrderedPartCollection`1 documentCodecs) +443
Raven.Database.DocumentDatabase..ctor(InMemoryRavenConfiguration configuration) +994
Raven.Client.Embedded.EmbeddableDocumentStore.InitializeInternal() +313 Raven.Client.Document.DocumentStore.Initialize() +463 Reflix.MvcApplication.InitializeRavenDB(String dataDirectory, Boolean rethrowException) +135 Reflix.MvcApplication.Application_Start() +131

[HttpException (0x80004005): Could not open transactional storage: C:\DWASFiles\Sites\reflix\VirtualDirectory0\site\wwwroot\App_Data\Data] System.Web.HttpApplicationFactory.EnsureAppStartCalledForIntegratedMode(HttpContext context, HttpApplication app) +9859441
System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +118
System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +172
System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +336
System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +296

[HttpException (0x80004005): Could not open transactional storage: C:\DWASFiles\Sites\reflix\VirtualDirectory0\site\wwwroot\App_Data\Data] System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +9873784 System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +101 System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +254

Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.18033

If I wait a minute or two, the web site comes up fine. So clearly this is a first-start issue. Anyone have any ideas how to resolve the problem?

My configuration:

  • MVC 4
  • .NET 4.5
  • RavenDB 2.0.2360

Update: The Azure team is looking at this as a possible defect with the Azure Websites. More updates as soon as I hear anything.

like image 931
mgnoonan Avatar asked May 21 '13 19:05

mgnoonan


1 Answers

This was confirmed as a bug in Azure Websites, which has now been rolled out. I don't have any additional details, but the site now works (8/30/2013) and I have made no structural changes to the code.

like image 129
mgnoonan Avatar answered Oct 11 '22 13:10

mgnoonan