RavenDb Raven.Server.exe service memory leaking

239 views
Skip to first unread message

Deividas Smailys

unread,
May 27, 2015, 1:57:39 PM5/27/15
to rav...@googlegroups.com

I've asked the same question on stackoverflow (http://stackoverflow.com/questions/30466876/ravendb-raven-server-exe-service-memory-leaking)

Following a comment on the post by Ayende Rahien, I am attaching a memory dump file of the process state. 
Here's the link: https://drive.google.com/file/d/0BzQR6LIFhi_nT0d0SzJ0aGVIdDQ/view?usp=sharing


Michael Yarichuk

unread,
May 27, 2015, 2:20:18 PM5/27/15
to rav...@googlegroups.com
what build are you using?

--
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+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Best regards,

 

Michael Yarichuk

RavenDB Core Team

Tel: 972-4-6227811

Fax:972-153-4-6227811

Email : michael....@hibernatingrhinos.com

 

RavenDB paving the way to "Data Made Simple" http://ravendb.net/  

Deividas Smailys

unread,
May 27, 2015, 2:45:41 PM5/27/15
to rav...@googlegroups.com
.net latest stable 3.0.3690

Oren Eini (Ayende Rahien)

unread,
May 28, 2015, 6:10:59 AM5/28/15
to ravendb
Thanks for this.
I'm not seeing a good reason for the memory usage. 

This is the result of the
 
Inline image 1

And the output of !dumpheap -stat is:

  5,742,924 Free
  6,509,776 System.Reflection.RuntimeMethodInfo
  7,305,970 System.Byte[]
14,333,016 System.Object[]

Total 899,312 objects

So I'm not actually seeing high memory usage.
There doesn't also seems to be any fragmentation.

!eeheap -gc

Gives us:

GC Heap Size:            Size: 0x3d50a48 (64293448) bytes.


So that isn't too big either.


All in all, this tells us that this isn't a managed memory leak.

!heap -s

Inline image 2

Also doesn't help. There doesn't seem to be any memory in the unmanaged heaps.


Are you using Esent or Voron here? How do you reproduce this?


Hibernating Rhinos Ltd  

Oren Eini l CEO Mobile: + 972-52-548-6969

Office: +972-4-622-7811 l Fax: +972-153-4-622-7811

 


On Wed, May 27, 2015 at 8:16 PM, Deividas Smailys <smailys....@gmail.com> wrote:

Federico Lois

unread,
May 28, 2015, 9:40:19 AM5/28/15
to rav...@googlegroups.com
Hi Deividas,

I dont know with ESENT but with Voron you shouldn't trust Task Manager to tell how much memory RavenDB is using. The culprit is that Voron use memory mapped files, and Task Manager is known to report the memory mapped files as part of the total memory, which is not entirely true as that memory is treated as a virtual memory space by the OS. You should use specialized tools like RamMap to know for sure how much memory you are really using. 


Federico

vt927...@gmail.com

unread,
May 29, 2015, 6:01:42 AM5/29/15
to rav...@googlegroups.com
We are seeing the same issue on both our DEV and TEST servers since upgrading to Raven 3.

Currently we're running 3.0.3690.

I've got a full memory dump from when this happened (it's 8.8GB in size).

We're seeing this with almost 100% consistency when recreating indexes. But it also happens frequently during querying activity.

Once the leak starts it does not subside until we stop the service.


vt927...@gmail.com

unread,
May 29, 2015, 6:01:44 AM5/29/15
to rav...@googlegroups.com

We're seeing a memory leak issue as well. On both our DEV and TEST servers since upgrading to Raven 3.

Currently we're running version 3.0.3690

Raven memory usage starts to grow until it takes up 100% of our server's memory. Once this happens the memory usage does not come back down until we force a restart of the Raven service.

It happens consistently after we recreate our indexes. And also randomly at other times during pure querying activities.

We've got a full memory dump of when this happens. The file is 8.8GB in size

It's definitely not a case of Task Manager misrepresenting memory usage, because our servers grind to a halt when this happens.



vt927...@gmail.com

unread,
May 29, 2015, 6:17:42 PM5/29/15
to rav...@googlegroups.com
I should also add, that we've seen exactly the same behaviour with both Esent and Voron.

After service restart, Raven server often just starts consuming all the memory again right away. It takes 2 or 3 restarts before it stop doing this.

Michael Yarichuk

unread,
May 30, 2015, 1:41:10 AM5/30/15
to rav...@googlegroups.com
Hi,
Can you share your dump?

--
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+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Message has been deleted

vt927...@gmail.com

unread,
May 30, 2015, 3:30:50 AM5/30/15
to rav...@googlegroups.com
It's 8.8GB and I don't want to post it to this public forum as it contains our production data.

How can I get it to you?

Oren Eini (Ayende Rahien)

unread,
May 31, 2015, 2:09:41 AM5/31/15
to ravendb
Okay, can you try setting:

Raven/DynamicLoadBalancing = false in the configuration and see if this works for you?

Hibernating Rhinos Ltd  

Oren Eini l CEO Mobile: + 972-52-548-6969

Office: +972-4-622-7811 l Fax: +972-153-4-622-7811

 


Reply all
Reply to author
Forward
0 new messages