4

I'm trying to get RavenDB running in embedded mode on a shared/multi-tenant webhost. RavenDB relies on the ESENT storage API. The filesystem on the hosting machines is locked down. The RavenDB Initialize() call results in the following eventlog entry

Raven (20604) D:\Path\To\Website\App_Data\RavenDB\Data52e0e402-79d7-4f47-a219-3d1e2e73321c: An attempt to determine the minimum I/O block size for the volume "D:\" containing "D:\Path\To\Website\App_Data\RavenDB\logs\" failed with system error 5 (0x00000005): "Access is denied. ".  The operation will fail with error -1032 (0xfffffbf8).

So presumably the executing process needs access to read some volume information and that is denied because the process is only given permissions to the parts of the volume relevant to it.

Anyone know what the relevant rights are, and whether they can be omitted somehow?

P.S.: someone with more karma than me please tag this ravendb and esent

1
  • Any luck running RavenDb on AppHarbor?
    – Korayem
    Feb 7, 2012 at 0:20

2 Answers 2

0

The Microsoft KB266361 shows error messages for ESE error codes.

In this case the error code -1032 is “Cannot access file, the file is locked or in use”.

Looking at other Microsoft products that heavily use ESE such as Exchange (See http://technet.microsoft.com/en-us/library/bb218334(v=exchg.80).aspx) the error message seems to be more consistent with a locking issue more so than a permission issue. Based on that you are running in a heavily multi-threaded environment of IIS with multi-tenancy this a locking issue would again be highly likely.

To help investigate this issue I would suggest using something like Process Explorer (See http://technet.microsoft.com/en-us/sysinternals/bb896653) to find out who has a lock on the file. This may show an external source as the cause of the file locking.

I would suggest investigating the method calling Initialize(). In high concurrency environments it may be possible for the method to be called by two separate threads. You may need to lock the section of code responsible for this function call.

If this does not help it may be better to ask the question with a code sample on StackOverflow.

Hope this helps.

0

Reading extended attributes on drive (root) is required for user/users on shared hosting to determine I/O block size.

2
  • Could you elaborate on this answer a bit? Some context would help to make it stand out, right now it's a little vague.
    – slm
    May 28, 2013 at 11:53
  • as per question 'Anyone know what the relevant rights are, and whether they can be omitted somehow?'. IF you encounter this specific issue it meas that Raven DB can't read the block io size, and it needs that knowledge. To allow Raven DB read that information, user under which code is executing needs to have rights on the root disk, and read extended attributes on Windows is the minimum that user should have to make the app works. Most hosting companies are giving read rights to root drive of web site, some does minimum like none on drive and full on web site folder.
    – Gutek
    Jun 3, 2013 at 21:34

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .