Since I switched to XWiki 10.1 (Windows 7 SP1, Tomcat 8.5.24) I experience OutOfMemoryExceptions despite the fact that I already increased to -Xmx6144m on the first occasion. Are there any known memory issue with the latest release?
Hi Guido, no such problem has been reported so far.
Could you give us more information on what you’re doing with your wiki that could cause this? What do you do when the OOM happens for example? Is it when doing some exports for example or anything special?
One idea would be for you to install javamelody to track memory usage and see how it evolves:
Are there any known memory issue with the latest release?
Not yet.
Usually the best in this case is to enable auto memory dump (-XX:+HeapDumpOnOutOfMemoryError) and analyze the produced file to try to find what kind of data is leaking (I usually do it with Yourkit but there is others).
Hi Thomas, I don’t have a professional tool for analyzing the dump. I just had a try with jhat and got the following top list for the object count:
4710576 instances of class com.xpn.xwiki.objects.ListProperty$NotifyList
4710523 instances of class com.xpn.xwiki.objects.DBStringListProperty
2060228 instances of class com.xpn.xwiki.objects.StringProperty
2053954 instances of class org.xwiki.model.reference.SpaceReference
1367349 instances of class com.xpn.xwiki.objects.IntegerProperty
691216 instances of class org.xwiki.model.reference.DocumentReference
687857 instances of class com.xpn.xwiki.objects.BaseObject
65536 instances of class org.apache.solr.update.VersionBucket
45295 instances of class org.apache.velocity.runtime.parser.Token
35312 instances of class org.xwiki.rendering.block.WordBlock
27586 instances of class org.apache.catalina.loader.ResourceEntry
22177 instances of class org.xwiki.rendering.block.SpaceBlock
14366 instances of class org.xwiki.rendering.block.SpecialSymbolBlock
11113 instances of class org.xwiki.localization.internal.DefaultTranslation
11089 instances of class org.xwiki.localization.messagetool.internal.MessageFormatTranslationMessage
10553 instances of class org.apache.lucene.util.BytesRef
10435 instances of class [Lorg.apache.velocity.runtime.parser.node.Node;
...
and in terms of memory
494604915 com.xpn.xwiki.objects.DBStringListProperty
231810488 java.util.HashMap$Node
183360292 com.xpn.xwiki.objects.StringProperty
144197200 [Ljava.lang.Object;
121694061 com.xpn.xwiki.objects.IntegerProperty
117764400 com.xpn.xwiki.objects.ListProperty$NotifyList
103465760 [Ljava.util.HashMap$Node;
98589792 org.xwiki.model.reference.SpaceReference
90797124 com.xpn.xwiki.objects.BaseObject
82486080 java.util.LinkedList$Node
76222784 java.util.ArrayList
49777788 [C
41074292 [S
38708096 org.xwiki.model.reference.DocumentReference
34175616 java.util.HashMap
16579536 java.util.LinkedList
11045968 java.util.Collections$UnmodifiableList
Kido,
I followed the instructions for installing JavaMelody. It was fairly straight forward and works fine.
It may not tell you exactly where your system is leaking memory, but it may give you some insight as to how your system is actually performing.
PS: does this page give you any hints where to look? http://www.xwiki.org/xwiki/bin/view/Documentation/AdminGuide/Performances/#HMemory
With yours and Vincents encouragement I’ll certainly use JavaMelody later to track performance issues. Currently, the server runs in an OutOfMemoryException very quickly and I don’t have the time to look at the evolution of the memory. Looking at the dump seems more appropriate to me. I think, that I shouldn’t see 5 million ListProperty$NotifyLists consuming half a GB after a short usage of the server. Especially the “Notify” makes me suspicious, since notifications are a central part of the new release.
To get a dump, that I can handle, I reduced the memory to 2GB, but I run out of memory with 6GB also, which really should be enough.
Maybe my problem is similar to XWIKI-10594. I’ll try to disable notifications…
Hi,
although I cannot contribute to a solution I would really be interested in some “key facts” about your wiki, if you don’t mind to share.
How many users/concurrent users do you have? How many pages? Are you using XClasses or (extensive) customizations?
Although that should not contribute to your problem, the choice of OS seems a bit unusual for a big installation with many users (no offence!). On the other hand if the wiki is small the high memory is even more troubling.
Thanks in advance.
It’s a very small installation with a maximum of 150 application pages and XObjects intended to generate documents using a moderate number of XClasses. There are currently two user. One working with it and me administrating and extending it.
Yourkit is nice but Eclipse Memory Analyzer Open Source Project | The Eclipse Foundation is supposed to do the job too.
This class actually does not have anything to do with the notification you have in the UI. It’s actually an internal object in ListProperty which is extended by DBStringListProperty for example so the first two lines pretty much say the same thing in practice. This type of java object are usually coming from the XWikiDocument cache so either you have a very big document cache of you have a bunch of document with a huge number of object containing DB list properties.
I didn’t modify the default value of the document cache, so it should be 500. I have 122 application pages with one custom XObject each that contain 120 DB list properties all together. Everything quite moderate. No idea. I go back to XWiki 9.11.3.
Did you get the same out of memory problems with 10.0?
We didn’t use it, pdwalker. Based on the assumption that 9.11.3 will fix the problem, my current plan is:
- Go back to 9.11.3 in “production” to hopefully jolly my single user along
- Install JavaMelody and look at the memory usage
- Set up a 10.1 test instance and try to get a reproducible test case
- Set up a 10.0 test instance and check that
- Come back with the result
Will take some time…
Tough luck that my application runs into that problem
Step 1. and 2. are done.
Performance is much better now. No OutOfMemory yet, but memory consumption quite high for one user playing with the application: 1GB mean, 3GB max
Intermediate (but hopefully also final) result: Being unable to reproduce the memory problem in the test environment, I set up XWiki 10.1 from scratch in production with empty permanent directory and database loading the data from a XAR backup. No memory problems yet!
[edit - deleted text because I made an incorrect observation]
Kido, I think I’ve found a memory leak of some kind in 10.2. It’s not the same objects taking up all the ram, but it may be related.