Configuration settings in web.config not working

110 views
Skip to first unread message

mare

unread,
May 24, 2013, 11:07:20 AM5/24/13
to rav...@googlegroups.com
I get an exception when adding these settings to the appsettings in web.config:

<add key="Raven/Esent/LogFileSize" value="4"/>
<add key="Raven/Esent/LogBuffers" value="2"/>
<add key="Raven/Esent/DbExtensionSize" value="4"/>

The exception is:
[EsentInvalidParameterException: Invalid API parameter]
   Microsoft.Isam.Esent.Interop.Api.Check(Int32 err) +29
   Microsoft.Isam.Esent.Interop.Api.JetSetSystemParameter(JET_INSTANCE instance, JET_SESID sesid, JET_param paramid, Int32 paramValue, String paramString) +102
   Microsoft.Isam.Esent.Interop.InstanceParameters.SetIntegerParameter(JET_param param, Int32 value) +37
   Raven.Storage.Esent.TransactionalStorageConfigurator.ConfigureInstance(JET_INSTANCE jetInstance, String path) +737
   Raven.Storage.Esent.TransactionalStorage.Initialize(IUuidGenerator uuidGenerator, OrderedPartCollection`1 documentCodecs) +174

[InvalidOperationException: Could not open transactional storage: E:\WEBSITES\LocalUser\site\App_Data\Data]
   Raven.Storage.Esent.TransactionalStorage.Initialize(IUuidGenerator uuidGenerator, OrderedPartCollection`1 documentCodecs) +843
   Raven.Database.DocumentDatabase..ctor(InMemoryRavenConfiguration configuration) +1989

?

Oren Eini (Ayende Rahien)

unread,
May 24, 2013, 11:10:55 AM5/24/13
to ravendb
I don't know if they go that low off the top of my head.
Try setting only one, and see what is causing the issue


--
You received this message because you are subscribed to the Google Groups "ravendb" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ravendb+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

mare

unread,
May 24, 2013, 11:15:03 AM5/24/13
to rav...@googlegroups.com
All right, I left only the first one (LogFileSize) and now I get this:

databases have been recovered, but the log file size used during recovery does not match JET_paramLogFileSize 
  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.EsentLogFileSizeMismatchDatabasesConsistentException: databases have been recovered, but the log file size used during recovery does not match JET_paramLogFileSize

Have to say that it is really painful to work with the Embedded version, everything you do on files or config throws the RavenDB off and starts complaining with exceptions like the one above. 

Oren Eini (Ayende Rahien)

unread,
May 24, 2013, 11:22:39 AM5/24/13
to ravendb
You can't change  the log file size after the db is created

mare

unread,
May 24, 2013, 11:24:48 AM5/24/13
to rav...@googlegroups.com
Seriously? I can't trim it off somehow?

Chris Marisic

unread,
May 24, 2013, 11:36:03 AM5/24/13
to rav...@googlegroups.com
I'm pretty sure log size can never be changed after the DB is created with a specific log size. Likely for the exact error you see. That's ESENT and out of raven's control.

mare

unread,
May 24, 2013, 11:38:06 AM5/24/13
to rav...@googlegroups.com
Is the embedded version the only one that depends on ESENT or do others also use ESENT?

Kijana Woodard

unread,
May 24, 2013, 11:38:47 AM5/24/13
to rav...@googlegroups.com
All.

mare

unread,
May 24, 2013, 11:44:23 AM5/24/13
to rav...@googlegroups.com
I deleted the embedded database altogether (deleted the AppData folder in ASP.NET MVC app) and it still complains about the invalid API parameter.

I followed these configuration options but there is no mention of minimum (maximum) values for these three settings:


It'd be nice if it said what the units are, I guess it's not 16 bananas. 

<add key="Raven/Esent/LogFileSize" value="4"/>
<add key="Raven/Esent/LogBuffers" value="2"/>
<add key="Raven/Esent/DbExtensionSize" value="4"/>

Oren Eini (Ayende Rahien)

unread,
May 24, 2013, 11:55:58 AM5/24/13
to ravendb
Try each of them on an independent db.
And those are all in MB

mare

unread,
May 24, 2013, 11:58:26 AM5/24/13
to rav...@googlegroups.com
Right, so this became a trial/error exercise.

Kijana Woodard

unread,
May 24, 2013, 12:02:09 PM5/24/13
to rav...@googlegroups.com
Out of curiosity, why are you trying to change the log size?

Chris Marisic

unread,
May 24, 2013, 12:02:46 PM5/24/13
to rav...@googlegroups.com
Or just use the default settings?

mare

unread,
May 24, 2013, 12:08:11 PM5/24/13
to rav...@googlegroups.com
Ok, apparently the LogBuffers minimum is 4, I guess. Although now I don't understand why the logs are 1MB in size when I explicitly specified 4MB.

Why I need that? I need logs at the absolute minimum, I copy the embedded DB over FTP (this gives me a lot of flexibility and I mentioned it before on this mailing list and no one was able to provide a better solution to work with RavenDB databases both locally and on server) a lot and having those 16MB log files there is just pure waste of space&time.

Kijana Woodard

unread,
May 24, 2013, 12:18:47 PM5/24/13
to rav...@googlegroups.com
Ok. I don't recall that thread.

I'm guessing it's client deployed behind firewalls so you can't replicate to a local copy?

mare

unread,
May 24, 2013, 12:46:05 PM5/24/13
to rav...@googlegroups.com
Replication could be an option but since I'm using very basic features of RavenDB now and they seem to work fine for me, that is, when they actually work (when issues start to happen, lots of stuff goes wrong). I don't usually solve problems by introducing additional complexity which introducing replication would obviously be.

Check out this issue for an instance of something that I can't explain:

Kijana Woodard

unread,
May 24, 2013, 12:52:52 PM5/24/13
to rav...@googlegroups.com
I see, you're just trying to grab the dbs for trouble shooting, not as a normal course of operations. Then yeah, replication would be overkill. 

That is a very strange issue. I've run embedded a bunch and haven't seen that. My case was embedded in a local web app if that makes sense. The user got to the app by http://localhost/app. The data file for was something like "c:\app\data". I had trouble getting it to work on a directory inside inetpub, so I just scratched that. Eventually, I started running the web app out of "c:\app\web". Not sure if that means anything to your case.

You're on 2360 embedded?
Reply all
Reply to author
Forward
0 new messages