jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Mueller <muel...@adobe.com>
Subject Re: too many open files / derby / suse
Date Mon, 28 Nov 2011 12:23:41 GMT
Hi,

Could you run "lsof" to find out what files are open? I guess most files
are open in a different area (not Derby). If it really is Derby, then an
option is to use another database, for example H2 (disclaimer: I'm one of
the committers of H2).

Regards,
Thomas


On 11/28/11 1:17 PM, "ulf schneider" <us@datenlabor.net> wrote:

>dear developers,
>i'm running a jackrabbit system with several workspaces (15) and using
>derby as embedded database on suse linux.
>since a few days and after adding another workspace i get exceptions like
>the one that i've attached to this e-mail (reproducable with jackrabbit
>2.2.9 and 2.2.10). i'm suspecting that the failure is originated by the
>number of workspaces.
>ulimit -n prints out a value of 1024.
>
>do you have recommendations how to deal with this issue?
>
>best regards, ulf.
>
>
>2011.11.27 13:11:00.087 ERROR [DbUtility.java:92] failed to close
>Connection
>2011.11.27 13:11:00.087 ERROR [DbUtility.java:94]        Reason: Already
>closed.
>2011.11.27 13:11:00.088 ERROR [DbUtility.java:95]    State/Code: null/0
>2011.11.27 13:11:00.095 ERROR [ConnectionHelper.java:498] Failed to
>execute SQL (stacktrace on DEBUG log level)
>org.apache.commons.dbcp.SQLNestedException: Borrow prepareStatement from
>pool failed
>        at
>org.apache.commons.dbcp.PoolingConnection.prepareStatement(PoolingConnecti
>on.java:98) ~[commons-dbcp-1.2.2.jar:1.2.2]
>        at
>org.apache.commons.dbcp.DelegatingConnection.prepareStatement(DelegatingCo
>nnection.java:248) ~[commons-dbcp-1.2.2.jar:1.2.2]
>        at
>org.apache.commons.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.prepa
>reStatement(PoolingDataSource.java:302) ~[commons-dbcp-1.2.2.jar:1.2.2]
>        at
>org.apache.jackrabbit.core.util.db.ConnectionHelper.reallyExec(ConnectionH
>elper.java:387) [jackrabbit-core-2.2.10.jar:2.2.10]
>        at
>org.apache.jackrabbit.core.util.db.ConnectionHelper$3.call(ConnectionHelpe
>r.java:371) ~[jackrabbit-core-2.2.10.jar:2.2.10]
>        at
>org.apache.jackrabbit.core.util.db.ConnectionHelper$3.call(ConnectionHelpe
>r.java:367) ~[jackrabbit-core-2.2.10.jar:2.2.10]
>        at
>org.apache.jackrabbit.core.util.db.ConnectionHelper$RetryManager.doTry(Con
>nectionHelper.java:494) ~[jackrabbit-core-2.2.10.jar:2.2.10]
>        at
>org.apache.jackrabbit.core.util.db.ConnectionHelper.exec(ConnectionHelper.
>java:367) [jackrabbit-core-2.2.10.jar:2.2.10]
>        at
>org.apache.jackrabbit.core.persistence.pool.BundleDbPersistenceManager.loa
>dReferencesTo(BundleDbPersistenceManager.java:1141)
>[jackrabbit-core-2.2.10.jar:2.2.10]
>        at
>org.apache.jackrabbit.core.state.SharedItemStateManager.getNodeReferences(
>SharedItemStateManager.java:335) [jackrabbit-core-2.2.10.jar:2.2.10]
>        at
>org.apache.jackrabbit.core.state.LocalItemStateManager.getNodeReferences(L
>ocalItemStateManager.java:218) [jackrabbit-core-2.2.10.jar:2.2.10]
>        at
>org.apache.jackrabbit.core.state.XAItemStateManager.getReferences(XAItemSt
>ateManager.java:372) [jackrabbit-core-2.2.10.jar:2.2.10]
>        at
>org.apache.jackrabbit.core.state.XAItemStateManager.hasNodeReferences(XAIt
>emStateManager.java:335) [jackrabbit-core-2.2.10.jar:2.2.10]
>        at
>org.apache.jackrabbit.core.state.SessionItemStateManager.hasNodeReferences
>(SessionItemStateManager.java:198) [jackrabbit-core-2.2.10.jar:2.2.10]
>        at
>org.apache.jackrabbit.core.NodeImpl.getReferences(NodeImpl.java:3028)
>[jackrabbit-core-2.2.10.jar:2.2.10]
>        at
>org.apache.jackrabbit.core.NodeImpl.getReferences(NodeImpl.java:2406)
>[jackrabbit-core-2.2.10.jar:2.2.10]
>        at
>dlab.content.ocm.OCMStorer.removeTaggingReferences(OCMStorer.java:459)
>[dlab_content_1.4.2.jar:na]
>        at dlab.content.ocm.OCMStorer.storeTagging(OCMStorer.java:1064)
>[dlab_content_1.4.2.jar:na]
>        at
>dlab.content.ocm.OCMStorer.storeFinalProperty(OCMStorer.java:789)
>[dlab_content_1.4.2.jar:na]
>        at
>dlab.content.ocm.ObjectContentMapperJsr170.traverseAndStoreObject(ObjectCo
>ntentMapperJsr170.java:1025) [dlab_content_1.4.2.jar:na]
>        at
>dlab.content.ocm.ObjectContentMapperJsr170.traverseAndStoreObject(ObjectCo
>ntentMapperJsr170.java:1066) [dlab_content_1.4.2.jar:na]
>        at
>dlab.content.ocm.ObjectContentMapperJsr170.setContent(ObjectContentMapperJ
>sr170.java:698) [dlab_content_1.4.2.jar:na]
>        at
>dlab.content.ocm.ObjectContentMapperJsr170.setContent(ObjectContentMapperJ
>sr170.java:710) [dlab_content_1.4.2.jar:na]
>        at
>dlab.content.service.ContentService.storeContent(ContentService.java:2908)
> [dlab_content_1.4.2.jar:na]
>        at
>dlab.content.service.ContentService.storeContent(ContentService.java:2859)
> [dlab_content_1.4.2.jar:na]
>        at
>dlab.docker.document.DocumentEditablePage.store(DocumentEditablePage.java:
>608) [dlab_docker_templating_1.4.2.jar:na]
>        at
>dlab.docker.document.DocumentEditablePage.onSubmit(DocumentEditablePage.ja
>va:510) [dlab_docker_templating_1.4.2.jar:na]
>        at
>dlab.web.dialog.DialogEditablePage$1.onSubmit(DialogEditablePage.java:116)
> [dlab_web_1.4.2.jar:na]
>        at
>org.apache.wicket.markup.html.form.Form$10.component(Form.java:1189)
>[wicket-core-1.5.3.jar:1.5.3]
>        at
>org.apache.wicket.markup.html.form.Form$10.component(Form.java:1184)
>[wicket-core-1.5.3.jar:1.5.3]
>        at
>org.apache.wicket.util.visit.Visits.visitPostOrderHelper(Visits.java:273)
>[wicket-util-1.5.3.jar:1.5.3]
>        at
>org.apache.wicket.util.visit.Visits.visitPostOrder(Visits.java:244)
>[wicket-util-1.5.3.jar:1.5.3]
>        at
>org.apache.wicket.markup.html.form.Form.delegateSubmit(Form.java:1182)
>[wicket-core-1.5.3.jar:1.5.3]
>        at org.apache.wicket.markup.html.form.Form.process(Form.java:838)
>[wicket-core-1.5.3.jar:1.5.3]
>        at
>org.apache.wicket.markup.html.form.Form.onFormSubmitted(Form.java:762)
>[wicket-core-1.5.3.jar:1.5.3]
>        at
>org.apache.wicket.markup.html.form.Form.onFormSubmitted(Form.java:692)
>[wicket-core-1.5.3.jar:1.5.3]
>        at sun.reflect.GeneratedMethodAccessor175.invoke(Unknown Source)
>~[na:na]
>        at
>sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorIm
>pl.java:25) ~[na:1.6.0_17]
>        at java.lang.reflect.Method.invoke(Method.java:597) ~[na:1.6.0_17]
>        at
>org.apache.wicket.RequestListenerInterface.internalInvoke(RequestListenerI
>nterface.java:260) [wicket-core-1.5.3.jar:1.5.3]
>        at
>org.apache.wicket.RequestListenerInterface.invoke(RequestListenerInterface
>.java:216) [wicket-core-1.5.3.jar:1.5.3]
>        at
>org.apache.wicket.request.handler.ListenerInterfaceRequestHandler.invokeLi
>stener(ListenerInterfaceRequestHandler.java:248)
>[wicket-core-1.5.3.jar:1.5.3]
>        at
>org.apache.wicket.request.handler.ListenerInterfaceRequestHandler.respond(
>ListenerInterfaceRequestHandler.java:234) [wicket-core-1.5.3.jar:1.5.3]
>        at
>org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(Reque
>stCycle.java:750) [wicket-core-1.5.3.jar:1.5.3]
>        at
>org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.
>java:64) [wicket-request-1.5.3.jar:1.5.3]
>        at
>org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:252
>) [wicket-core-1.5.3.jar:1.5.3]
>        at
>org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.j
>ava:209) [wicket-core-1.5.3.jar:1.5.3]
>        at
>org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(Reque
>stCycle.java:280) [wicket-core-1.5.3.jar:1.5.3]
>        at
>org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.j
>ava:162) [wicket-core-1.5.3.jar:1.5.3]
>        at
>org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:21
>8) [wicket-core-1.5.3.jar:1.5.3]
>        at
>org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applicati
>onFilterChain.java:235) [catalina-6.0.16.jar:na]
>        at
>org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilter
>Chain.java:206) [catalina-6.0.16.jar:na]
>        at
>org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.
>java:233) [catalina-6.0.16.jar:na]
>        at
>org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.
>java:174) [catalina-6.0.16.jar:na]
>        at
>org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:1
>28) [catalina-6.0.16.jar:na]
>        at
>org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:1
>02) [catalina-6.0.16.jar:na]
>        at
>org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.ja
>va:109) [catalina-6.0.16.jar:na]
>        at
>org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286
>) [catalina-6.0.16.jar:na]
>        at
>org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
> [tomcat-coyote-6.0.16.jar:na]
>        at
>org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Ht
>tp11Protocol.java:583) [tomcat-coyote-6.0.16.jar:na]
>        at
>org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
>[tomcat-coyote-6.0.16.jar:na]
>        at java.lang.Thread.run(Thread.java:619) [na:1.6.0_17]
>Caused by: java.sql.SQLException: Meta-data for Container
>org.apache.derby.impl.store.raw.data.RAFContainer4@3e6e4eff could not be
>accessed
>        at
>org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(Unknown
>Source) ~[derby-10.5.3.0_1.jar:na]
>        at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown
>Source) ~[derby-10.5.3.0_1.jar:na]
>        at org.apache.derby.impl.jdbc.Util.seeNextException(Unknown
>Source) ~[derby-10.5.3.0_1.jar:na]
>        at
>org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(Unkn
>own Source) ~[derby-10.5.3.0_1.jar:na]
>        at
>org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(Unknown
> Source) ~[derby-10.5.3.0_1.jar:na]
>        at
>org.apache.derby.impl.jdbc.EmbedConnection.handleException(Unknown
>Source) ~[derby-10.5.3.0_1.jar:na]
>        at
>org.apache.derby.impl.jdbc.ConnectionChild.handleException(Unknown
>Source) ~[derby-10.5.3.0_1.jar:na]
>        at
>org.apache.derby.impl.jdbc.EmbedPreparedStatement.<init>(Unknown Source)
>~[derby-10.5.3.0_1.jar:na]
>        at
>org.apache.derby.impl.jdbc.EmbedPreparedStatement20.<init>(Unknown
>Source) ~[derby-10.5.3.0_1.jar:na]
>        at
>org.apache.derby.impl.jdbc.EmbedPreparedStatement30.<init>(Unknown
>Source) ~[derby-10.5.3.0_1.jar:na]
>        at
>org.apache.derby.impl.jdbc.EmbedPreparedStatement40.<init>(Unknown
>Source) ~[derby-10.5.3.0_1.jar:na]
>        at
>org.apache.derby.jdbc.Driver40.newEmbedPreparedStatement(Unknown Source)
>~[derby-10.5.3.0_1.jar:na]
>        at
>org.apache.derby.impl.jdbc.EmbedConnection.prepareStatement(Unknown
>Source) ~[derby-10.5.3.0_1.jar:na]
>        at
>org.apache.derby.impl.jdbc.EmbedConnection.prepareStatement(Unknown
>Source) ~[derby-10.5.3.0_1.jar:na]
>        at
>org.apache.commons.dbcp.PoolingConnection.makeObject(PoolingConnection.jav
>a:193) ~[commons-dbcp-1.2.2.jar:1.2.2]
>        at
>org.apache.commons.pool.impl.GenericKeyedObjectPool.borrowObject(GenericKe
>yedObjectPool.java:797) ~[commons-pool-1.3.jar:1.3]
>        at
>org.apache.commons.dbcp.PoolingConnection.prepareStatement(PoolingConnecti
>on.java:92) ~[commons-dbcp-1.2.2.jar:1.2.2]
>        ... 61 common frames omitted
>Caused by: org.apache.derby.impl.jdbc.EmbedSQLException: Meta-data for
>Container org.apache.derby.impl.store.raw.data.RAFContainer4@3e6e4eff
>could not be accessed
>        at
>org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown
>Source) ~[derby-10.5.3.0_1.jar:na]
>        at
>org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcros
>sDRDA(Unknown Source) ~[derby-10.5.3.0_1.jar:na]
>        ... 78 common frames omitted
>Caused by: org.apache.derby.impl.jdbc.EmbedSQLException: Java exception:
>'/srv/docker/workspaces/CRM/db/seg0/c3f1.dat (Too many open files):
>java.io.FileNotFoundException'.
>        at
>org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown
>Source) ~[derby-10.5.3.0_1.jar:na]
>        at
>org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcros
>sDRDA(Unknown Source) ~[derby-10.5.3.0_1.jar:na]
>        at
>org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(Unknown
>Source) ~[derby-10.5.3.0_1.jar:na]
>        at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown
>Source) ~[derby-10.5.3.0_1.jar:na]
>        at org.apache.derby.impl.jdbc.Util.javaException(Unknown Source)
>~[derby-10.5.3.0_1.jar:na]
>        at
>org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(Unkn
>own Source) ~[derby-10.5.3.0_1.jar:na]
>        ... 75 common frames omitted
>Caused by: java.io.FileNotFoundException:
>/srv/docker/workspaces/CRM/db/seg0/c3f1.dat (Too many open files)
>        at java.io.RandomAccessFile.open(Native Method) ~[na:1.6.0_17]
>        at java.io.RandomAccessFile.<init>(RandomAccessFile.java:212)
>~[na:1.6.0_17]
>        at org.apache.derby.impl.io.DirRandomAccessFile.<init>(Unknown
>Source) ~[derby-10.5.3.0_1.jar:na]
>        at org.apache.derby.impl.io.DirRandomAccessFile4.<init>(Unknown
>Source) ~[derby-10.5.3.0_1.jar:na]
>        at org.apache.derby.impl.io.DirFile4.getRandomAccessFile(Unknown
>Source) ~[derby-10.5.3.0_1.jar:na]
>        at org.apache.derby.impl.store.raw.data.RAFContainer.run(Unknown
>Source) ~[derby-10.5.3.0_1.jar:na]
>        at java.security.AccessController.doPrivileged(Native Method)
>~[na:1.6.0_17]
>        at
>org.apache.derby.impl.store.raw.data.RAFContainer.openContainer(Unknown
>Source) ~[derby-10.5.3.0_1.jar:na]
>        at
>org.apache.derby.impl.store.raw.data.RAFContainer4.openContainer(Unknown
>Source) ~[derby-10.5.3.0_1.jar:na]
>        at
>org.apache.derby.impl.store.raw.data.FileContainer.setIdent(Unknown
>Source) ~[derby-10.5.3.0_1.jar:na]
>        at
>org.apache.derby.impl.store.raw.data.RAFContainer.setIdentity(Unknown
>Source) ~[derby-10.5.3.0_1.jar:na]
>        at
>org.apache.derby.impl.services.cache.ConcurrentCache.find(Unknown Source)
>~[derby-10.5.3.0_1.jar:na]
>        at
>org.apache.derby.impl.store.raw.data.BaseDataFileFactory.openContainer(Unk
>nown Source) ~[derby-10.5.3.0_1.jar:na]
>        at
>org.apache.derby.impl.store.raw.data.BaseDataFileFactory.openContainer(Unk
>nown Source) ~[derby-10.5.3.0_1.jar:na]
>        at
>org.apache.derby.impl.store.raw.xact.Xact.openContainer(Unknown Source)
>~[derby-10.5.3.0_1.jar:na]
>        at
>org.apache.derby.impl.store.access.btree.index.B2IFactory.readConglomerate
>(Unknown Source) ~[derby-10.5.3.0_1.jar:na]
>        at
>org.apache.derby.impl.store.access.RAMAccessManager.conglomCacheFind(Unkno
>wn Source) ~[derby-10.5.3.0_1.jar:na]
>        at
>org.apache.derby.impl.store.access.RAMTransaction.findExistingConglomerate
>(Unknown Source) ~[derby-10.5.3.0_1.jar:na]
>        at
>org.apache.derby.impl.store.access.RAMTransaction.openStoreCost(Unknown
>Source) ~[derby-10.5.3.0_1.jar:na]
>        at
>org.apache.derby.impl.sql.compile.CompilerContextImpl.getStoreCostControll
>er(Unknown Source) ~[derby-10.5.3.0_1.jar:na]
>        at
>org.apache.derby.impl.sql.compile.FromBaseTable.getStoreCostController(Unk
>nown Source) ~[derby-10.5.3.0_1.jar:na]
>        at
>org.apache.derby.impl.sql.compile.FromBaseTable.estimateCost(Unknown
>Source) ~[derby-10.5.3.0_1.jar:na]
>        at
>org.apache.derby.impl.sql.compile.OptimizerImpl.estimateTotalCost(Unknown
>Source) ~[derby-10.5.3.0_1.jar:na]
>        at
>org.apache.derby.impl.sql.compile.OptimizerImpl.costBasedCostOptimizable(U
>nknown Source) ~[derby-10.5.3.0_1.jar:na]
>        at
>org.apache.derby.impl.sql.compile.OptimizerImpl.costOptimizable(Unknown
>Source) ~[derby-10.5.3.0_1.jar:na]
>        at
>org.apache.derby.impl.sql.compile.FromBaseTable.optimizeIt(Unknown
>Source) ~[derby-10.5.3.0_1.jar:na]
>        at
>org.apache.derby.impl.sql.compile.ProjectRestrictNode.optimizeIt(Unknown
>Source) ~[derby-10.5.3.0_1.jar:na]
>        at
>org.apache.derby.impl.sql.compile.OptimizerImpl.costPermutation(Unknown
>Source) ~[derby-10.5.3.0_1.jar:na]
>        at org.apache.derby.impl.sql.compile.SelectNode.optimize(Unknown
>Source) ~[derby-10.5.3.0_1.jar:na]
>        at
>org.apache.derby.impl.sql.compile.DMLStatementNode.optimizeStatement(Unkno
>wn Source) ~[derby-10.5.3.0_1.jar:na]
>        at
>org.apache.derby.impl.sql.compile.CursorNode.optimizeStatement(Unknown
>Source) ~[derby-10.5.3.0_1.jar:na]
>        at org.apache.derby.impl.sql.GenericStatement.prepMinion(Unknown
>Source) ~[derby-10.5.3.0_1.jar:na]
>        at org.apache.derby.impl.sql.GenericStatement.prepare(Unknown
>Source) ~[derby-10.5.3.0_1.jar:na]
>        at
>org.apache.derby.impl.sql.conn.GenericLanguageConnectionContext.prepareInt
>ernalStatement(Unknown Source) ~[derby-10.5.3.0_1.jar:na]
>        ... 71 common frames omitted
>--
>ulf schneider
>+49 163 2505164
>mail: us@datenlabor.net
>blog: http://allesagil.net
>
>datenlabor gmbh
>sitz: paderborn, hrb 8819
>geschäftsführer: ulf schneider
>http://datenlabor.net
>
>Am 25.11.2011 um 18:01 schrieb Julian Reschke:
>
>> On 2011-11-25 17:36, Alex Parvulescu wrote:
>>> ok, I kinda lost here
>>>
>>> any ideas how the root node can be sometimes protected?
>>>
>>>
>>>http://www.day.com/maven/javax.jcr/javadocs/jcr-2.0/javax/jcr/nodetype/I
>>>temDefinition.html#isProtected()
>>> http://www.day.com/specs/jcr/2.0/3_Repository_Model.html#3.7.2.2
>>>Protected
>>>
>>> alex
>>> ...
>>
>> What's the actual node type definition?
>


Mime
View raw message