RavenDB 4 - Attempt to allocate from reset arena without calling renew

508 views
Skip to first unread message

Drikus van Dyk

unread,
Aug 17, 2018, 2:17:59 AM8/17/18
to RavenDB - 2nd generation document database
Good day,

When trying to store a document we sometimes get a "Attempt to allocate from reset arena without calling renew" error. Sometimes we get it consistently in a middle of a chuck of involved code, however we would get the exception on one machine and then it will work fine on another machine. 

The document being stored is typically fairly big (e.g. 580KB), but we only retain the document for 24 hours. We have however also had the same exception in case where we are trying to do a Load of a very small document. 

We are running on .NET Framework 4.6 using the RavenDB client version 4.0.5.

Below is the stack trace:

Unable to process affordability request: System.InvalidOperationException: Attempt to allocate from reset arena without calling renew at Sparrow.Json.ArenaMemoryAllocator.Allocate(Int32 size) at Sparrow.Json.JsonOperationContext.GetStream(Int32 initialSize) at Sparrow.Json.BlittableWriter`1.ResetAndRenew() at Sparrow.Json.BlittableJsonDocumentBuilder.Renew(String debugTag, UsageMode mode) at Sparrow.Json.JsonOperationContext.ReadObjectInternal(Object builder, String documentId, UsageMode mode, IBlittableDocumentModifier modifier) at Raven.Client.Documents.Session.InMemoryDocumentSessionOperations.StoreEntityInUnitOfWork(String id, Object entity, String changeVector, DynamicJsonValue metadata, ConcurrencyCheckMode forceConcurrencyCheck) at Raven.Client.Documents.Session.InMemoryDocumentSessionOperations.StoreInternal(Object entity, String changeVector, String id, ConcurrencyCheckMode forceConcurrencyCheck) at Raven.Client.Documents.Session.InMemoryDocumentSessionOperations.Store(Object entity)

Oren Eini (Ayende Rahien)

unread,
Aug 19, 2018, 4:13:26 AM8/19/18
to ravendb
To verify, you are never using the session concurrently from multiple threads, right?
Can you reproduce this?

Oren Eini
CEO   /   Hibernating Rhinos LTD
Mobile:  972-52-5486969  Skype:  ayenderahien
Sales:  sa...@ravendb.net  Support:  sup...@ravendb.net

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

Drikus van Dyk

unread,
Aug 20, 2018, 1:02:27 AM8/20/18
to RavenDB - 2nd generation document database
Yes, it will definitely never be used across multiple threads. Unfortunately we have been unable to reproduce the problem on a small application. We have been able to confirm that the document size is not relevant at all. What steps can we take in order to narrow down what is causing the problem?

Thank you in advance.

To unsubscribe from this group and stop receiving emails from it, send an email to ravendb+u...@googlegroups.com.

Oren Eini (Ayende Rahien)

unread,
Aug 20, 2018, 2:30:01 AM8/20/18
to ravendb
Is it always with the same stack trace? (also on you app)
Is it always on the same type of document?
Anything that you noticed about it?

To unsubscribe from this group and stop receiving emails from it, send an email to ravendb+unsubscribe@googlegroups.com.

Drikus van Dyk

unread,
Aug 20, 2018, 8:08:59 AM8/20/18
to RavenDB - 2nd generation document database
Apparently I lied to you. Higher up in our stack trace everything was executing in an async method - i.e. running on a different thread. We have now changed that and the problem has been resolved.

Thank you very much for your assistance.

Oren Eini (Ayende Rahien)

unread,
Aug 20, 2018, 9:34:10 AM8/20/18
to ravendb
Okay, great to hear this

To unsubscribe from this group and stop receiving emails from it, send an email to ravendb+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages