jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ard Schrijvers <a.schrijv...@onehippo.com>
Subject Re: Lucene - out of memory
Date Wed, 25 Aug 2010 12:04:27 GMT
On Wed, Aug 25, 2010 at 2:01 PM, Seidel. Robert <Robert.Seidel@aeb.de> wrote:
> Hi,
>
> the memory settings are: -Xms512m -Xmx1024m -XX:MaxPermSize=256m
> I'm using a 32bit OS.

Seems to me enough. You are not by accident using the in memory Lucene
directory version right (in repository.xml for the SearchIndex).

You otherwise might want to inspect a memory snapshot if possible to
see where the memory went.

Regards Ard

> There were no queries made at that time.
>
> @Karl: How could you deactivate Lucene? When I remove the <SearchIndex>-Tag from
the configuration, I get such an error when trying to start the repository:
>
> 2010-08-03 12:20:51,313 ERROR (AuthorizableImpl.java:371) - Failed to retrieve membership
references of User 'admin'.
> javax.jcr.RepositoryException: Unable to retrieve WEAKREFERENCE properties that refer
to 21232f29-7a57-35a7-8389-4a0e4a801fc3
>        at org.apache.jackrabbit.core.NodeImpl.getWeakReferences(NodeImpl.java:3461)
>        at org.apache.jackrabbit.core.security.user.AuthorizableImpl.getMembershipReferences(AuthorizableImpl.java:369)
>        at org.apache.jackrabbit.core.security.user.AuthorizableImpl.collectMembership(AuthorizableImpl.java:312)
>        at org.apache.jackrabbit.core.security.user.AuthorizableImpl.memberOf(AuthorizableImpl.java:100)
>        at org.apache.jackrabbit.core.security.principal.DefaultPrincipalProvider.collectGroupMembership(DefaultPrincipalProvider.java:290)
>        at org.apache.jackrabbit.core.security.principal.DefaultPrincipalProvider.getGroupMembership(DefaultPrincipalProvider.java:194)
>        at org.apache.jackrabbit.core.security.authentication.AbstractLoginModule.getPrincipals(AbstractLoginModule.java:676)
>        at org.apache.jackrabbit.core.security.authentication.AbstractLoginModule.commit(AbstractLoginModule.java:369)
>        at org.apache.jackrabbit.core.security.authentication.LocalAuthContext.login(LocalAuthContext.java:86)
>        at org.apache.jackrabbit.core.RepositoryImpl.login(RepositoryImpl.java:1497)
>        at org.apache.jackrabbit.core.TransientRepository.login(TransientRepository.java:380)
>        at org.apache.jackrabbit.commons.AbstractRepository.login(AbstractRepository.java:123)
>        at de.aeb.xnsg.archive.cr.jackrabbit.JRRepositoryManager.login(JRRepositoryManager.java:129)
>        at de.aeb.xnsg.cr.jackrabbit.concurrency.ConcurrencyScenario01Test.initializeRepositoy(ConcurrencyScenario01Test.java:85)
>        at de.aeb.xnsg.cr.jackrabbit.concurrency.ConcurrencyScenario01Test.testNoIndex(ConcurrencyScenario01Test.java:64)
>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>        at java.lang.reflect.Method.invoke(Method.java:585)
>        at junit.framework.TestCase.runTest(TestCase.java:164)
>        at junit.framework.TestCase.runBare(TestCase.java:130)
>        at junit.framework.TestResult$1.protect(TestResult.java:106)
>        at junit.framework.TestResult.runProtected(TestResult.java:124)
>        at junit.framework.TestResult.run(TestResult.java:109)
>        at junit.framework.TestCase.run(TestCase.java:120)
>        at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
>        at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
>        at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
>        at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
>        at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
>        at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
> Caused by: javax.jcr.RepositoryException: no search manager configured for this workspace
>        at org.apache.jackrabbit.core.WorkspaceImpl.getQueryManager(WorkspaceImpl.java:778)
>        at org.apache.jackrabbit.core.NodeImpl.getWeakReferences(NodeImpl.java:3445)
>        ... 30 more
>
> Kindly regards,
>
> Robert Seidel
>
> -----Ursprüngliche Nachricht-----
> Von: Karl Meier [mailto:furzgesicht@gmail.com]
> Gesendet: Mittwoch, 25. August 2010 09:40
> An: users@jackrabbit.apache.org
> Betreff: Re: Lucene - out of memory
>
> We had the same issue. Additionally it's getting slower and slower. The only
> way was to deactivate Lucene.
>
> On Wed, Aug 25, 2010 at 9:30 AM, Ard Schrijvers
> <a.schrijvers@onehippo.com>wrote:
>
>> Hello Robert,
>>
>> with how much memory is your application running? Are you also doing
>> searches at the same time? In specific, sorting on properties?
>>
>> Furthermore, Lucene is quite memory consuming, certainly the way
>> Jackrabbit is using it. You just have to make sure you have enough
>> memory
>>
>> Regards Ard
>>
>> On Wed, Aug 25, 2010 at 9:24 AM, Seidel. Robert <Robert.Seidel@aeb.de>
>> wrote:
>> > Hi,
>> >
>> > After storing a while data (about 80.000 nodes) into an CR, an out of
>> memory error occurred:
>> >
>> > 2010-08-25 00:22:58,439 ERROR (IndexMerger.java:568) - Error while
>> merging indexes:
>> > java.lang.OutOfMemoryError: Java heap space
>> >            at java.util.HashMap.resize(HashMap.java:508)
>> >            at java.util.HashMap.addEntry(HashMap.java:799)
>> >            at java.util.HashMap.put(HashMap.java:431)
>> >            at
>> org.apache.jackrabbit.core.query.lucene.CachingIndexReader$CacheInitializer$1.collect(CachingIndexReader.java:433)
>> >            at
>> org.apache.jackrabbit.core.query.lucene.CachingIndexReader$CacheInitializer.collectTermDocs(CachingIndexReader.java:515)
>> >            at
>> org.apache.jackrabbit.core.query.lucene.CachingIndexReader$CacheInitializer.initializeParents(CachingIndexReader.java:425)
>> >            at
>> org.apache.jackrabbit.core.query.lucene.CachingIndexReader$CacheInitializer.run(CachingIndexReader.java:386)
>> >            at
>> org.apache.jackrabbit.core.query.lucene.CachingIndexReader.<init>(CachingIndexReader.java:135)
>> >            at
>> org.apache.jackrabbit.core.query.lucene.AbstractIndex.getReadOnlyIndexReader(AbstractIndex.java:315)
>> >            at
>> org.apache.jackrabbit.core.query.lucene.MultiIndex.replaceIndexes(MultiIndex.java:665)
>> >            at
>> org.apache.jackrabbit.core.query.lucene.IndexMerger$Worker.run(IndexMerger.java:551)
>> >            at
>> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:417)
>> >            at
>> java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:269)
>> >            at java.util.concurrent.FutureTask.run(FutureTask.java:123)
>> >            at
>> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:65)
>> >            at
>> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:168)
>> >            at
>> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
>> >            at
>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
>> >            at java.lang.Thread.run(Thread.java:595)
>> >
>> > If I add more properties or change the binary data mime type for full
>> text indexing, then I'll get the error sooner.
>> >
>> > If I quit the application and restart it, it works again for a while. It
>> seems to me, that lucene is stacking up memory.
>> >
>> > How can I handle that situation?
>> >
>> > Kindly regards,
>> >
>> > Robert Seidel
>> >
>>
>

Mime
View raw message