Error writing to log file using RavenDB Embedded on Windows Azure

I am running the MVC website on Windows Azure and using the built-in RavenDB. If the website is cold (unloaded from an Azure instance), I get the following error message when I first get to the website:

Server error in application "/".

Log file write failure

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

Exception Details: Microsoft.Isam.Esent.Interop.EsentLogWriteFailException: Failed to write to the log file

Source Error:

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

Stack trace:

[EsentLogWriteFailException: write to log file failed]
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: Failed to open transactional store: C: \ DWASFiles \ Sites \ reflix \ VirtualDirectory0 \ site \ Wwwroot \ App_Data \ Data] Raven.Storage.Esent.TransactionalStorage.Initialize (IUuidGenerator uuidGenerator, OrderedPartCollection1)
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) +135pplixix

[HttpException (0x80004005): Could not open transactional storage: C: \ DWASFiles \ Sites \ reflix \ VirtualDirectory0 \ site \ Wwwroot \ App_Data \ Data] System.Web.HttpApplicationFactory.EnsureAppStartCalledForIntegratedMode (HttpCon9pp1 context, application
System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS (IntPtr appContext, HttpContext context, MethodInfo [] +118 handlers
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.WebHtt. 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 website fits perfectly. So it is clear that this is a matter of first launch. Anyone have any ideas how to solve the problem?

My configuration:

  • MVC 4
  • .NET 4.5
  • RavenDB 2.0.2360

Update: The Azure team sees this as a possible defect with Azure websites. More updates as soon as I hear something.

+6
source share
2 answers

This has been confirmed as a bug on Azure websites, which is now deployed. I have no additional data, but the site is working (8/30/2013), and I have not made any structural changes to the code.

+1
source

Look at the event log, it will give you more information. It seems that something doesnโ€™t allow logging correctly, checking permissions, in particular, you can have CREATE_FILE permission, but not WRITE permission

0
source

Source: https://habr.com/ru/post/945517/


All Articles