AppHarbor EmbeddedRavenDB errors

205 views
Skip to first unread message

Phil Jones

unread,
Jan 20, 2012, 9:51:33 AM1/20/12
to ravendb
I wonder if you guys could help me with a sample application I've been
trying to make for deploying to AppHarbor. I thought it would be
rather simple to use RavenDB embedded to store some data.

The apps source is here:

https://bitbucket.org/philjones88/skeetfacts

And the AppHarbor site is here (I've turned customErrors off to help
debug):

http://skeet-quotes.apphb.com/

I'm using the latest unstable embedded build off Nuget as I wanted
access to the RandomOrdering feature you added.

P.s. this is meant to be quick joke application ;-)

Exception:
Microsoft.Isam.Esent.Interop.EsentFileAccessDeniedException: Cannot
access file, the file is locked or in use

Stack Trace:

[EsentFileAccessDeniedException: Cannot access file, the file is
locked or in use]
Microsoft.Isam.Esent.Interop.Api.Check(Int32 err) in C:\Work\ravendb
\SharedLibs\Sources\managedesent-61618\EsentInterop\Api.cs:2739
Microsoft.Isam.Esent.Interop.Api.JetInit(JET_INSTANCE& instance) in
C:\Work\ravendb\SharedLibs\Sources\managedesent-61618\EsentInterop
\Api.cs:131
Raven.Storage.Esent.TransactionalStorage.Initialize(IUuidGenerator
uuidGenerator) in c:\Builds\raven-unstable\Raven.Storage.Esent
\TransactionalStorage.cs:207

[InvalidOperationException: Could not open transactional storage: D:
\websites\86\cc824\0x0007\_PublishedWebsites\SkeetFacts.Web\App_Data
\RavenDB\Data]
Raven.Storage.Esent.TransactionalStorage.Initialize(IUuidGenerator
uuidGenerator) in c:\Builds\raven-unstable\Raven.Storage.Esent
\TransactionalStorage.cs:220
Raven.Database.DocumentDatabase..ctor(InMemoryRavenConfiguration
configuration) in c:\Builds\raven-unstable\Raven.Database
\DocumentDatabase.cs:152
Raven.Client.Embedded.EmbeddableDocumentStore.InitializeInternal()
in c:\Builds\raven-unstable\Raven.Client.Embedded
\EmbeddableDocumentStore.cs:137
Raven.Client.Document.DocumentStore.Initialize() in c:\Builds\raven-
unstable\Raven.Client.Lightweight\Document\DocumentStore.cs:471
SkeetFacts.Web.MvcApplication.RavenDbStartup() in d:\temp
\y4y532r3.eq3\input\SkeetFacts.Web\Global.asax.cs:44
SkeetFacts.Web.MvcApplication.Application_Start() in d:\temp
\y4y532r3.eq3\input\SkeetFacts.Web\Global.asax.cs:55

[HttpException (0x80004005): Could not open transactional storage: D:
\websites\86\cc824\0x0007\_PublishedWebsites\SkeetFacts.Web\App_Data
\RavenDB\Data]

System.Web.HttpApplicationFactory.EnsureAppStartCalledForIntegratedMode(HttpContext
context, HttpApplication app) +9170861
System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr
appContext, HttpContext context, MethodInfo[] handlers) +131
System.Web.HttpApplication.InitSpecial(HttpApplicationState state,
MethodInfo[] handlers, IntPtr appContext, HttpContext context) +194

System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr
appContext, HttpContext context) +339
System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr
appContext) +253

[HttpException (0x80004005): Could not open transactional storage: D:
\websites\86\cc824\0x0007\_PublishedWebsites\SkeetFacts.Web\App_Data
\RavenDB\Data]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context)
+9089964
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context)
+97

System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest
wr, HttpContext context) +256

Oren Eini (Ayende Rahien)

unread,
Jan 20, 2012, 10:46:24 AM1/20/12
to rav...@googlegroups.com
do you have write permission to the disk?

Phil Jones

unread,
Jan 20, 2012, 10:47:44 AM1/20/12
to ravendb
Yes I've turned that on.

On Jan 20, 3:46 pm, "Oren Eini (Ayende Rahien)" <aye...@ayende.com>
wrote:

Oren Eini (Ayende Rahien)

unread,
Jan 20, 2012, 10:49:48 AM1/20/12
to rav...@googlegroups.com
I am assuming that there is only once instance of the app, right?
The init looks right, can you double check the write permissions there? 
It looks like that is the problem.

Phil Jones

unread,
Jan 20, 2012, 10:52:26 AM1/20/12
to ravendb
Yes only one instance. Write permissions are on. I'll double check by
disabling and enabling (and deploying between to make sure).

On Jan 20, 3:49 pm, "Oren Eini (Ayende Rahien)" <aye...@ayende.com>
wrote:

Oren Eini (Ayende Rahien)

unread,
Jan 20, 2012, 10:53:19 AM1/20/12
to rav...@googlegroups.com
Also, have something that write there as well, just to be really sure :-)

Phil Jones

unread,
Jan 20, 2012, 11:03:46 AM1/20/12
to ravendb
I've put some code in to write a test.txt file to /static/test.txt but
I can't access it, I suspect its being routed through the application,
I've even tried adding a ignore route.

On Jan 20, 3:53 pm, "Oren Eini (Ayende Rahien)" <aye...@ayende.com>
wrote:

Oren Eini (Ayende Rahien)

unread,
Jan 20, 2012, 12:59:19 PM1/20/12
to rav...@googlegroups.com
/static/text.txt ?
That looks like a ravendb attachment url.
I was suggesting just doing File.Write("App_data/foo.txt")

Phil Jones

unread,
Jan 20, 2012, 2:41:40 PM1/20/12
to ravendb
No the project has a static folder for images/css etc. It should be
writing to /static/test.txt as the test.

I added trying to see if it writes to App_Data/test2.txt but the IIS
used on AppHarbor (and by default) doesn't allow access to that
folder.

On Jan 20, 5:59 pm, "Oren Eini (Ayende Rahien)" <aye...@ayende.com>
wrote:

Phil Jones

unread,
Jan 20, 2012, 2:55:54 PM1/20/12
to ravendb
In my scenario it generates the seed data if its missing, so I've
switched it to the in memory option. Seeing as the data would get
overwritten whenever a new deployment happens it seems like a good
compromise.

Looking forward to RavenDB as an addon though ;-)

friism

unread,
Jan 21, 2012, 1:54:22 PM1/21/12
to ravendb
This is a know problem: http://serverfault.com/questions/292545/esent-fails-to-determine-the-minimum-i-o-block-size

I have tried with some vigour to get RavenDB working on AppHarbor,
without any luck.

We hope someone will to RavenDB as an AppHarbor add-on soon, and I'd
recommend using that.
Michael

Justin A

unread,
Jan 22, 2012, 3:44:11 AM1/22/12
to rav...@googlegroups.com
Mike, it's in the works. Ayende has said that the NH team are trying to get something working. So we just need to be patient.

Chris Marisic

unread,
Jan 23, 2012, 4:59:14 PM1/23/12
to rav...@googlegroups.com
You could try the munin store, not sure how production ready it is.


On Saturday, January 21, 2012 1:54:22 PM UTC-5, friism wrote:
This is a know problem: http://serverfault.com/questions/292545/esent-fails-to-determine-the-minimum-i-o-block-size

I have tried with some vigour to get RavenDB working on AppHarbor,
without any luck.

We hope someone will to RavenDB as an AppHarbor add-on soon, and I'd
recommend using that.
Michael

On Jan 20, 11:55 am, Phil Jones <phil.j...@gmail.com> wrote:
> In my scenario it generates the seed data if its missing, so I've
> switched it to the in memory option. Seeing as the data would get
> overwritten whenever a new deployment happens it seems like a good
> compromise.
>
> Looking forward to RavenDB as an addon though ;-)
>
> On Jan 20, 7:41 pm, Phil Jones <phil.j...@gmail.com> wrote:
>
>
>
>
>
>
>
> > No the project has a static folder for images/css etc. It should be
> > writing to /static/test.txt as the test.
>
> > I added trying to see if it writes to App_Data/test2.txt but the IIS
> > used on AppHarbor (and by default) doesn't allow access to that
> > folder.
>
> > On Jan 20, 5:59 pm, "Oren Eini (Ayende Rahien)" <aye...@ayende.com>
> > wrote:
>
> > > /static/text.txt ?
> > > That looks like a ravendb attachment url.
> > > I was suggesting just doing File.Write("App_data/foo.txt")
>
> > > On Fri, Jan 20, 2012 at 11:03 AM, Phil Jones <phil.j...@gmail.com> wrote:
> > > > I've put some code in to write a test.txt file to /static/test.txt but
> > > > I can't access it, I suspect its being routed through the application,
> > > > I've even tried adding a ignore route.
>
> > > > On Jan 20, 3:53 pm, "Oren Eini (Ayende Rahien)" <aye...@ayende.com>
> > > > wrote:
> > > > > Also, have something that write there as well, just to be really sure :-)
>
> > > > > On Fri, Jan 20, 2012 at 10:52 AM, Phil Jones <phil.j...@gmail.com>
> > > > wrote:
> > > > > > Yes only one instance. Write permissions are on. I'll double check by
> > > > > > disabling and enabling (and deploying between to make sure).
>
> > > > > > On Jan 20, 3:49 pm, "Oren Eini (Ayende Rahien)" <aye...@ayende.com>
> > > > > > wrote:
> > > > > > > I am assuming that there is only once instance of the app, right?
> > > > > > > The init looks right, can you double check the write permissions
> > > > there?
> > > > > > > It looks like that is the problem.
>
> > > > > > > On Fri, Jan 20, 2012 at 10:47 AM, Phil Jones <phil.j...@gmail.com
>
> > > > > > wrote:
> > > > > > > > Yes I've turned that on.
>
> > > > > > > > On Jan 20, 3:46 pm, "Oren Eini (Ayende Rahien)" <aye...@ayende.com
>
> > > > > > > > wrote:
> > > > > > > > > do you have write permission to the disk?
>
> > > > > > > > > On Fri, Jan 20, 2012 at 9:51 AM, Phil Jones <
> > > > phil.j...@gmail.com>

Itamar Syn-Hershko

unread,
Jan 23, 2012, 5:02:43 PM1/23/12
to rav...@googlegroups.com
It is not supposed to be used on production. It won't really help too, as the data folder there won't necessarily be persisted.
Reply all
Reply to author
Forward
0 new messages