You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by Frédéric Esnault <fe...@legisway.com> on 2007/06/06 13:25:05 UTC

[JCR Controller] Out of memory

Hi Jacco,

It seems you have a regression in your app. Now we have an OutOfMemory error we didn't have with previous version (I'm using 0.61 as I said this morning). With a total of 10 000 contents, (3x 3300), clicking on one of the three categories root node (ie. the contracts node, containing the contract nodes), we get the OOM error.

My boss had the same with 1 000 contents only (divided also in three).

Here is the stack trace :
-----------------------------------------------------------------------------------------------------------
INFO - Repository started
INFO - Transient repository initialized
INFO - Session opened
INFO - resizeAll size=6
INFO - resizeAll size=6
INFO - resizeAll size=6
INFO - resizeAll size=6
INFO - resizeAll size=6
INFO - resizeAll size=6
INFO - resizeAll size=6
Exception in thread "Timer-2" java.lang.OutOfMemoryError: Java heap space
        at java.util.HashMap.<init>(Unknown Source)
        at org.apache.jackrabbit.core.query.lucene.MultiIndex.checkIndexingQueue
(MultiIndex.java:1054)
        at org.apache.jackrabbit.core.query.lucene.MultiIndex.access$000(MultiIn
dex.java:75)
        at org.apache.jackrabbit.core.query.lucene.MultiIndex$1.run(MultiIndex.j
ava:322)
        at java.util.TimerThread.mainLoop(Unknown Source)
        at java.util.TimerThread.run(Unknown Source)
Exception in thread "AWT-EventQueue-0" java.lang.OutOfMemoryError: Java heap spa
ce
        at java.lang.Class.getDeclaredMethods0(Native Method)
        at java.lang.Class.privateGetDeclaredMethods(Unknown Source)
        at java.lang.Class.getMethod0(Unknown Source)
        at java.lang.Class.getMethod0(Unknown Source)
        at java.lang.Class.getMethod(Unknown Source)
        at nl.msd.jdots.JD_Object.JD_doMethod(JD_Object.java:272)
        at nl.msd.jdots.JD_Object.JD_reportError(JD_Object.java:374)
        at nl.msd.jdots.JD_Object.JD_reportError(JD_Object.java:360)
        at nl.msd.jdots.JD_Thread.run(JD_Thread.java:61)
        at nl.msd.jdots.JD_Object.JD_doMethod(JD_Object.java:309)
        at nl.msd.jcr.gui.JCRE_DefaultTreeNode.childNodeIsAdded(JCRE_DefaultTree
Node.java:553)
        at nl.msd.jcr.gui.JCRE_DefaultTreeNode$TreeNodeThread.run(JCRE_DefaultTr
eeNode.java:87)
        at nl.msd.jcr.gui.JCRE_DefaultTreeNode.startNodeThread(JCRE_DefaultTreeN
ode.java:272)
        at nl.msd.jcr.gui.JCRE_DefaultTreeNode.grabTreeChildren(JCRE_DefaultTree
Node.java:361)
        at nl.msd.jcr.gui.JCRE_DefaultTreeNode.getChildCount(JCRE_DefaultTreeNod
e.java:401)
        at javax.swing.tree.DefaultTreeModel.getChildCount(Unknown Source)
        at javax.swing.tree.VariableHeightLayoutCache$TreeStateNode.expand(Unkno
wn Source)
        at javax.swing.tree.VariableHeightLayoutCache$TreeStateNode.expand(Unkno
wn Source)
        at javax.swing.tree.VariableHeightLayoutCache.ensurePathIsExpanded(Unkno
wn Source)
        at javax.swing.tree.VariableHeightLayoutCache.setExpandedState(Unknown S
ource)
        at javax.swing.plaf.basic.BasicTreeUI.updateExpandedDescendants(Unknown
Source)
        at javax.swing.plaf.basic.BasicTreeUI$Handler.treeExpanded(Unknown Sourc
e)
        at javax.swing.JTree.fireTreeExpanded(Unknown Source)
        at javax.swing.JTree.setExpandedState(Unknown Source)
        at javax.swing.JTree.expandPath(Unknown Source)
        at javax.swing.plaf.basic.BasicTreeUI.toggleExpandState(Unknown Source)
        at javax.swing.plaf.basic.BasicTreeUI.handleExpandControlClick(Unknown S
ource)
        at javax.swing.plaf.basic.BasicTreeUI.checkForClickInExpandControl(Unkno
wn Source)
        at javax.swing.plaf.basic.BasicTreeUI$Handler.handleSelection(Unknown So
urce)
        at javax.swing.plaf.basic.BasicTreeUI$Handler.mousePressedDND(Unknown So
urce)
        at javax.swing.plaf.basic.BasicTreeUI$Handler.mousePressed(Unknown Sourc
e)
        at java.awt.AWTEventMulticaster.mousePressed(Unknown Source)
Exception in thread "AWT-EventQueue-0" java.lang.OutOfMemoryError: Java heap spa
ce
        at java.util.Arrays.copyOfRange(Unknown Source)
        at java.lang.String.<init>(Unknown Source)
        at java.lang.StringBuffer.toString(Unknown Source)
        at java.net.URLStreamHandler.toExternalForm(Unknown Source)
        at java.net.URL.toExternalForm(Unknown Source)
        at javax.swing.ImageIcon.<init>(Unknown Source)
        at nl.msd.jcr.gui.JCRE_GUIJCRTreeNode.getStdIcon(JCRE_GUIJCRTreeNode.jav
a:25)
        at nl.msd.jcr.gui.JCRE_GUITreeNode.getComponent(JCRE_GUITreeNode.java:63
)
Exception in thread "AWT-EventQueue-0" java.lang.OutOfMemoryError: Java heap spa
ce
Exception in thread "AWT-EventQueue-0" java.lang.OutOfMemoryError: Java heap spa
ce
Exception in thread "AWT-EventQueue-0" java.lang.OutOfMemoryError: Java heap spa
ce
-----------------------------------------------------------------------------------------------------------
Frédéric Esnault - Ingénieur R&D
Legisway
60 boulevard de la mission Marchand
92400 Courbevoie La Défense
 

Re: [JCR Controller] Out of memory

Posted by Jacco van Weert <11...@gmail.com>.
On 6/6/07, Frédéric Esnault <fe...@legisway.com> wrote:
>
> Hi Jacco,
>
> It seems you have a regression in your app. Now we have an OutOfMemory
> error we didn't have with previous version (I'm using 0.61 as I said this
> morning). With a total of 10 000 contents, (3x 3300), clicking on one of the
> three categories root node (ie. the contracts node, containing the contract
> nodes), we get the OOM error.
>
> My boss had the same with 1 000 contents only (divided also in three).



I experience the same problem with large amount of nodes. The difference
between 0.6 and 0.6x is that the Node retrieval and reporting to the
TreeModel is done in threads (v0.6)  and was moved to one thread (v0.6x),
this because of the "gaps" in the tree..... but it seems that a new bug was
introduced instead.... :-(
I just hating the Swing TreeModel :-)

This evening I will try to solve the problem.



Jacco



-- 
-------------------------------------
Jacco van Weert -- 1111software@gmail.com
JCR Controller -- http://www.xs4all.nl/~weertj/jcr

RE: [JCR Controller] Performance

Posted by Frédéric Esnault <fe...@legisway.com>.
Ok I have to apologize. The performance seems fine.
In fact my app (web application) performs a search on //lgw:contract in 49 seconds (there is 3 000 contract nodes to find and display). JCR Controller does the same search in 47 seconds. ;)
Shame on me, congratulations to you !

Frédéric Esnault - Ingénieur R&D
Legisway
60 boulevard de la mission Marchand
92400 Courbevoie La Défense
 


RE: [JCR Controller] Out of memory - SOLVED

Posted by Frédéric Esnault <fe...@legisway.com>.
Congratulations ;)

It works, no out of memory error, and without the -Xmx512m, good work !

Two comments now :
1. As i told you, i work on a three node types test model : contracts -> contractors -> contacts. What's strange is when I open a contract and double click on one contractor refence in the table, it opens an select the corresponding node in the tree. But when I double click, in the newly opened contractor, on a contact reference in the table, it selects the contact property of the contractor node, it does not open the corresponding contact node. Any idea why?
2. You should still have a look at the performance problem. Opening 3000 contracts node (just selecting the contracts root and display the nodes) works but slowly. And the list of   "INFO - resizeAll size=6"  displayed during the processing of the node opening makes me wonder why it does this same operation so many times...

But well, the OOM problem is solved now, once again congratulations, and if you wish, I can have a look at the performance problem when you release the source code.

Keep up the good work!

Oh and by the way, the import feature seems fine, with all options one could hope for. Nice job there too. May be you could think of giving the choice between document view or system view. I did it for my app and honestly the work to add the second option when the first one is done is ...say....5 minutes work, for both import and export.

Frédéric Esnault - Ingénieur R&D
Legisway
60 boulevard de la mission Marchand
92400 Courbevoie La Défense
 
-----Message d'origine-----
De : Jacco van Weert [mailto:1111software@gmail.com] 
Envoyé : jeudi 7 juin 2007 20:58
À : users@jackrabbit.apache.org
Objet : Re: [JCR Controller] Out of memory

On 6/7/07, Frédéric Esnault <fe...@legisway.com> wrote:
>
> Sorry to bring bad news, but v0.63 doesn't solve the problem.



Well... I think (famous last words) I have now solved the problem.... I hope
so :-)...

Try the new v0.64 version


"fingers crossed"

Jacco




-- 
> -------------------------------------
> Jacco van Weert -- 1111software@gmail.com
> JCR Controller -- http://www.xs4all.nl/~weertj/jcr

Re: [JCR Controller] Out of memory

Posted by Jacco van Weert <11...@gmail.com>.
On 6/7/07, Frédéric Esnault <fe...@legisway.com> wrote:
>
> Sorry to bring bad news, but v0.63 doesn't solve the problem.



Well... I think (famous last words) I have now solved the problem.... I hope
so :-)...

Try the new v0.64 version


"fingers crossed"

Jacco




-- 
> -------------------------------------
> Jacco van Weert -- 1111software@gmail.com
> JCR Controller -- http://www.xs4all.nl/~weertj/jcr

RE: [JCR Controller] Out of memory

Posted by Frédéric Esnault <fe...@legisway.com>.
Sorry to bring bad news, but v0.63 doesn't solve the problem.

I tried also with a -Xmx512m argument, the out of memory comes also, but I had to let it work loner (say 1 or 2 minutes before the error). This makes me think (sorry), that it's even worse, because v0.62 was successfully displaying one category of nodes (clicking on another one raised the OOM error) when I was using the -Xmx512m option.

I don't know how you load your nodes, lazy or eager, but it seems strange that it takes so long to retrieve the list of nodes for my contracts. Basically it's just one containing nodes, with 3300 nodes under it. 

- lgw:contracts
|- lgw:contract
|- lgw:contract
|- lgw:contract
|- lgw:contract
|- lgw:contract
...

May be you should turn back to the v0.60 (well before the 0.61) version, then try to think again what created that error. And think also about the node loading strategy. I'll run tests on reading lots of nodes from my app, and let you know about my results.

---------------------

Normal launch (not using -Xmx512m), 9900 contents (3x 3300) : 

E:\Tools\JCRController>go
INFO - Starting repository...
WARN - Existing lock file at E:\Workspace\.metadata\.plugins\org.eclipse.wst.ser
ver.core\tmp0\webapps\testapp\WEB-INF\repository\.lock detected. Repository was
not shut down properly.
INFO - LocalFileSystem initialized at path E:\Workspace\.metadata\.plugins\org.e
clipse.wst.server.core\tmp0\webapps\testapp\WEB-INF\repository\repository
INFO - LocalFileSystem initialized at path E:\Workspace\.metadata\.plugins\org.e
clipse.wst.server.core\tmp0\webapps\testapp\WEB-INF\repository\version
INFO - initializing workspace 'default'...
INFO - LocalFileSystem initialized at path E:\Workspace\.metadata\.plugins\org.e
clipse.wst.server.core\tmp0\webapps\testapp\WEB-INF\repository\workspaces\defaul
t
INFO - workspace 'default' initialized
INFO - LocalFileSystem initialized at path E:\Workspace\.metadata\.plugins\org.e
clipse.wst.server.core\tmp0\webapps\testapp\WEB-INF\repository\repository\index
INFO - Index initialized: E:\Workspace\.metadata\.plugins\org.eclipse.wst.server
.core\tmp0\webapps\testapp\WEB-INF\repository/repository/index
INFO - LocalFileSystem initialized at path E:\Workspace\.metadata\.plugins\org.e
clipse.wst.server.core\tmp0\webapps\testapp\WEB-INF\repository\workspaces\defaul
t\index
INFO - Index initialized: E:\Workspace\.metadata\.plugins\org.eclipse.wst.server
.core\tmp0\webapps\testapp\WEB-INF\repository\workspaces\default/index
INFO - Repository started
INFO - Transient repository initialized
INFO - Session opened
INFO - resizeAll size=6
INFO - resizeAll size=6
INFO - resizeAll size=6
INFO - resizeAll size=6
INFO - resizeAll size=6
INFO - resizeAll size=6
INFO - resizeAll size=6
INFO - resizeAll size=6
INFO - resizeAll size=6
INFO - resizeAll size=6
Exception in thread "AWT-EventQueue-0" java.lang.OutOfMemoryError: Java heap spa
ce
        at java.lang.Class.getDeclaredMethods0(Native Method)
        at java.lang.Class.privateGetDeclaredMethods(Unknown Source)
        at java.lang.Class.getMethod0(Unknown Source)
        at java.lang.Class.getMethod0(Unknown Source)
        at java.lang.Class.getMethod(Unknown Source)
        at nl.msd.jdots.JD_Object.JD_doMethod(JD_Object.java:272)
        at nl.msd.jdots.JD_Thread.run(JD_Thread.java:58)
        at nl.msd.jdots.JD_Object.JD_doMethod(JD_Object.java:309)
        at nl.msd.jcr.gui.JCRE_DefaultTreeNode.childNodeIsAdded(JCRE_DefaultTree
Node.java:470)
        at nl.msd.jcr.gui.JCRE_DefaultTreeNode$TreeNodeThread.run(JCRE_DefaultTr
eeNode.java:59)
        at nl.msd.jcr.gui.JCRE_DefaultTreeNode.startNodeThread(JCRE_DefaultTreeN
ode.java:215)
        at nl.msd.jcr.gui.JCRE_DefaultTreeNode.grabTreeChildren(JCRE_DefaultTree
Node.java:285)
        at nl.msd.jcr.gui.JCRE_DefaultTreeNode.getChildCount(JCRE_DefaultTreeNod
e.java:329)
        at javax.swing.tree.DefaultTreeModel.getChildCount(Unknown Source)
        at javax.swing.tree.VariableHeightLayoutCache$TreeStateNode.expand(Unkno
wn Source)
        at javax.swing.tree.VariableHeightLayoutCache$TreeStateNode.expand(Unkno
wn Source)
        at javax.swing.tree.VariableHeightLayoutCache.ensurePathIsExpanded(Unkno
wn Source)
        at javax.swing.tree.VariableHeightLayoutCache.setExpandedState(Unknown S
ource)
        at javax.swing.plaf.basic.BasicTreeUI.updateExpandedDescendants(Unknown
Source)
        at javax.swing.plaf.basic.BasicTreeUI$Handler.treeExpanded(Unknown Sourc
e)
        at javax.swing.JTree.fireTreeExpanded(Unknown Source)
        at javax.swing.JTree.setExpandedState(Unknown Source)
        at javax.swing.JTree.expandPath(Unknown Source)
        at javax.swing.plaf.basic.BasicTreeUI.toggleExpandState(Unknown Source)
        at javax.swing.plaf.basic.BasicTreeUI.handleExpandControlClick(Unknown S
ource)
        at javax.swing.plaf.basic.BasicTreeUI.checkForClickInExpandControl(Unkno
wn Source)
        at javax.swing.plaf.basic.BasicTreeUI$Handler.handleSelection(Unknown So
urce)
        at javax.swing.plaf.basic.BasicTreeUI$Handler.mousePressedDND(Unknown So
urce)
        at javax.swing.plaf.basic.BasicTreeUI$Handler.mousePressed(Unknown Sourc
e)
        at java.awt.AWTEventMulticaster.mousePressed(Unknown Source)
        at java.awt.Component.processMouseEvent(Unknown Source)
        at javax.swing.JComponent.processMouseEvent(Unknown Source)
        at java.awt.Component.processEvent(Unknown Source)
        at java.awt.Container.processEvent(Unknown Source)
Exception in thread "AWT-EventQueue-0" java.lang.OutOfMemoryError: Java heap spa
ce
        at java.util.Arrays.copyOf(Unknown Source)
        at java.lang.AbstractStringBuilder.expandCapacity(Unknown Source)
Terminer le programme de commandes (O/N) ? o





Frédéric Esnault - Ingénieur R&D
Legisway
60 boulevard de la mission Marchand
92400 Courbevoie La Défense
 

-----Message d'origine-----
De : Jacco van Weert [mailto:1111software@gmail.com] 
Envoyé : mercredi 6 juin 2007 23:08
À : users@jackrabbit.apache.org
Objet : Re: [JCR Controller] Out of memory

On 6/6/07, Frédéric Esnault <fe...@legisway.com> wrote:
>
> Hi Jacco,
>
> It seems you have a regression in your app. Now we have an OutOfMemory
> error we didn't have with previous version (I'm using 0.61 as I said this
> morning). With a total of 10 000 contents, (3x 3300), clicking on one of the
> three categories root node (ie. the contracts node, containing the contract
> nodes), we get the OOM error.
>
> My boss had the same with 1 000 contents only (divided also in three).



Hello Frédéric,


I have tuned the memory consumption. The problem lies in the node creation
labels (layout issues). Let me know if there is still a memory boundary.

The new version v0.63 is online


Jacco





-- 
> -------------------------------------
> Jacco van Weert -- 1111software@gmail.com
> JCR Controller -- http://www.xs4all.nl/~weertj/jcr

Re: [JCR Controller] Out of memory

Posted by Jacco van Weert <11...@gmail.com>.
On 6/6/07, Frédéric Esnault <fe...@legisway.com> wrote:
>
> Hi Jacco,
>
> It seems you have a regression in your app. Now we have an OutOfMemory
> error we didn't have with previous version (I'm using 0.61 as I said this
> morning). With a total of 10 000 contents, (3x 3300), clicking on one of the
> three categories root node (ie. the contracts node, containing the contract
> nodes), we get the OOM error.
>
> My boss had the same with 1 000 contents only (divided also in three).



Hello Frédéric,


I have tuned the memory consumption. The problem lies in the node creation
labels (layout issues). Let me know if there is still a memory boundary.

The new version v0.63 is online


Jacco





-- 
> -------------------------------------
> Jacco van Weert -- 1111software@gmail.com
> JCR Controller -- http://www.xs4all.nl/~weertj/jcr