db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Knut Anders Hatlen (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DERBY-3688) multiple db instance and ERROR XSDG3: Meta-data for Container org.apache.derby.impl.store.raw.data.RAFContainer4@d1cfbb could not be accessed
Date Thu, 12 Jun 2008 11:19:45 GMT

    [ https://issues.apache.org/jira/browse/DERBY-3688?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12604488#action_12604488
] 

Knut Anders Hatlen commented on DERBY-3688:
-------------------------------------------

Derby keeps some resources open even after you have closed the last connection to the database.
Each open database will have a page cache and a container cache, among other things. The container
cache contains the file handles, and by default caches up to 100 handles. So the total number
of open files could be quite big if you have loaded many databases.

To shut down a database instance after you are finished with it, you can call:
  DriverManager.getConnection("jdbc:derby:name_of_database;shutdown=true");
This will free all the resources that this database instance previously held.

You can find more details about database shutdown here: http://db.apache.org/derby/docs/10.4/devguide/tdevdvlp40464.html

> multiple db instance and ERROR XSDG3: Meta-data for Container org.apache.derby.impl.store.raw.data.RAFContainer4@d1cfbb
could not be accessed
> ---------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-3688
>                 URL: https://issues.apache.org/jira/browse/DERBY-3688
>             Project: Derby
>          Issue Type: Bug
>         Environment: Windows 2000, JDK1.4.2, derby 10.3.3.0,10.4.1.3 and others
>            Reporter: Se Youn Ban
>            Priority: Critical
>         Attachments: derby.log
>
>
> I got this error when I took queries for multiple db instances. 
> I make db instance for every day and access the db instance of the day when I need to
query.
> The size of one day db instance is about 6G.
> When I try to select query for a week, the ERROR XSDG3 occurs and derby is goning to
be crashed.
> Please, check the attached derby log.
> --------------------------------
> ERROR XSDG3: Meta-data for Container org.apache.derby.impl.store.raw.data.RAFContainer4@d1cfbb
could not be accessed
> 	at org.apache.derby.iapi.error.StandardException.newException(StandardException.java:296)
> 	at org.apache.derby.impl.store.raw.data.RAFContainer.run(RAFContainer.java:1451)
> 	at java.security.AccessController.doPrivileged(Native Method)
> 	at org.apache.derby.impl.store.raw.data.RAFContainer.openContainer(RAFContainer.java:854)
> 	at org.apache.derby.impl.store.raw.data.RAFContainer4.openContainer(RAFContainer4.java:146)
> 	at org.apache.derby.impl.store.raw.data.FileContainer.setIdent(FileContainer.java:365)
> 	at org.apache.derby.impl.store.raw.data.RAFContainer.setIdentity(RAFContainer.java:134)
> 	at org.apache.derby.impl.services.cache.CachedItem.takeOnIdentity(CachedItem.java:222)
> 	at org.apache.derby.impl.services.cache.Clock.addEntry(Clock.java:800)
> 	at org.apache.derby.impl.services.cache.Clock.find(Clock.java:303)
> 	at org.apache.derby.impl.store.raw.data.BaseDataFileFactory.openContainer(BaseDataFileFactory.java:629)
> 	at org.apache.derby.impl.store.raw.data.BaseDataFileFactory.openContainer(BaseDataFileFactory.java:559)
> 	at org.apache.derby.impl.store.raw.xact.Xact.openContainer(Xact.java:1283)
> 	at org.apache.derby.impl.store.access.heap.HeapConglomerateFactory.readConglomerate(HeapConglomerateFactory.java:237)
> 	at org.apache.derby.impl.store.access.RAMAccessManager.conglomCacheFind(RAMAccessManager.java:482)
> 	at org.apache.derby.impl.store.access.RAMTransaction.findExistingConglomerate(RAMTransaction.java:397)
> 	at org.apache.derby.impl.store.access.RAMTransaction.openStoreCost(RAMTransaction.java:1664)
> 	at org.apache.derby.impl.sql.compile.CompilerContextImpl.getStoreCostController(CompilerContextImpl.java:460)
> 	at org.apache.derby.impl.sql.compile.FromBaseTable.getStoreCostController(FromBaseTable.java:4471)
> 	at org.apache.derby.impl.sql.compile.FromBaseTable.estimateCost(FromBaseTable.java:946)
> 	at org.apache.derby.impl.sql.compile.OptimizerImpl.estimateTotalCost(OptimizerImpl.java:2623)
> 	at org.apache.derby.impl.sql.compile.OptimizerImpl.costBasedCostOptimizable(OptimizerImpl.java:2171)
> 	at org.apache.derby.impl.sql.compile.OptimizerImpl.costOptimizable(OptimizerImpl.java:1984)
> 	at org.apache.derby.impl.sql.compile.FromBaseTable.optimizeIt(FromBaseTable.java:520)
> 	at org.apache.derby.impl.sql.compile.ProjectRestrictNode.optimizeIt(ProjectRestrictNode.java:316)
> 	at org.apache.derby.impl.sql.compile.OptimizerImpl.costPermutation(OptimizerImpl.java:1938)
> 	at org.apache.derby.impl.sql.compile.SelectNode.optimize(SelectNode.java:1766)
> 	at org.apache.derby.impl.sql.compile.TableOperatorNode.optimizeSource(TableOperatorNode.java:894)
> 	at org.apache.derby.impl.sql.compile.UnionNode.optimizeIt(UnionNode.java:255)
> 	at org.apache.derby.impl.sql.compile.OptimizerImpl.costPermutation(OptimizerImpl.java:1938)
> 	at org.apache.derby.impl.sql.compile.TableOperatorNode.optimizeSource(TableOperatorNode.java:886)
> 	at org.apache.derby.impl.sql.compile.UnionNode.optimizeIt(UnionNode.java:249)
> 	at org.apache.derby.impl.sql.compile.OptimizerImpl.costPermutation(OptimizerImpl.java:1938)
> 	at org.apache.derby.impl.sql.compile.TableOperatorNode.optimizeSource(TableOperatorNode.java:886)
> 	at org.apache.derby.impl.sql.compile.UnionNode.optimizeIt(UnionNode.java:249)
> 	at org.apache.derby.impl.sql.compile.OptimizerImpl.costPermutation(OptimizerImpl.java:1938)
> 	at org.apache.derby.impl.sql.compile.TableOperatorNode.optimizeSource(TableOperatorNode.java:886)
> 	at org.apache.derby.impl.sql.compile.UnionNode.optimizeIt(UnionNode.java:249)
> 	at org.apache.derby.impl.sql.compile.OptimizerImpl.costPermutation(OptimizerImpl.java:1938)
> 	at org.apache.derby.impl.sql.compile.TableOperatorNode.optimizeSource(TableOperatorNode.java:886)
> 	at org.apache.derby.impl.sql.compile.UnionNode.optimizeIt(UnionNode.java:249)
> 	at org.apache.derby.impl.sql.compile.OptimizerImpl.costPermutation(OptimizerImpl.java:1938)
> 	at org.apache.derby.impl.sql.compile.TableOperatorNode.optimizeSource(TableOperatorNode.java:886)
> 	at org.apache.derby.impl.sql.compile.UnionNode.optimizeIt(UnionNode.java:249)
> 	at org.apache.derby.impl.sql.compile.OptimizerImpl.costPermutation(OptimizerImpl.java:1938)
> 	at org.apache.derby.impl.sql.compile.TableOperatorNode.optimizeSource(TableOperatorNode.java:886)
> 	at org.apache.derby.impl.sql.compile.UnionNode.optimizeIt(UnionNode.java:249)
> 	at org.apache.derby.impl.sql.compile.OptimizerImpl.costPermutation(OptimizerImpl.java:1938)
> 	at org.apache.derby.impl.sql.compile.TableOperatorNode.optimizeSource(TableOperatorNode.java:886)
> 	at org.apache.derby.impl.sql.compile.UnionNode.optimizeIt(UnionNode.java:249)
> 	at org.apache.derby.impl.sql.compile.OptimizerImpl.costPermutation(OptimizerImpl.java:1938)
> 	at org.apache.derby.impl.sql.compile.TableOperatorNode.optimizeSource(TableOperatorNode.java:886)
> 	at org.apache.derby.impl.sql.compile.UnionNode.optimizeIt(UnionNode.java:249)
> 	at org.apache.derby.impl.sql.compile.OptimizerImpl.costPermutation(OptimizerImpl.java:1938)
> 	at org.apache.derby.impl.sql.compile.TableOperatorNode.optimizeSource(TableOperatorNode.java:886)
> 	at org.apache.derby.impl.sql.compile.UnionNode.optimizeIt(UnionNode.java:249)
> 	at org.apache.derby.impl.sql.compile.OptimizerImpl.costPermutation(OptimizerImpl.java:1938)
> 	at org.apache.derby.impl.sql.compile.TableOperatorNode.optimizeSource(TableOperatorNode.java:886)
> 	at org.apache.derby.impl.sql.compile.UnionNode.optimizeIt(UnionNode.java:249)
> 	at org.apache.derby.impl.sql.compile.OptimizerImpl.costPermutation(OptimizerImpl.java:1938)
> 	at org.apache.derby.impl.sql.compile.TableOperatorNode.optimizeSource(TableOperatorNode.java:886)
> 	at org.apache.derby.impl.sql.compile.UnionNode.optimizeIt(UnionNode.java:249)
> 	at org.apache.derby.impl.sql.compile.OptimizerImpl.costPermutation(OptimizerImpl.java:1938)
> 	at org.apache.derby.impl.sql.compile.TableOperatorNode.optimizeSource(TableOperatorNode.java:886)
> 	at org.apache.derby.impl.sql.compile.UnionNode.optimizeIt(UnionNode.java:249)
> 	at org.apache.derby.impl.sql.compile.ProjectRestrictNode.optimizeIt(ProjectRestrictNode.java:316)
> 	at org.apache.derby.impl.sql.compile.OptimizerImpl.costPermutation(OptimizerImpl.java:1938)
> 	at org.apache.derby.impl.sql.compile.SelectNode.optimize(SelectNode.java:1766)
> 	at org.apache.derby.impl.sql.compile.DMLStatementNode.optimizeStatement(DMLStatementNode.java:305)
> 	at org.apache.derby.impl.sql.compile.CursorNode.optimizeStatement(CursorNode.java:515)
> 	at org.apache.derby.impl.sql.GenericStatement.prepMinion(GenericStatement.java:365)
> 	at org.apache.derby.impl.sql.GenericStatement.prepare(GenericStatement.java:88)
> 	at org.apache.derby.impl.sql.conn.GenericLanguageConnectionContext.prepareInternalStatement(GenericLanguageConnectionContext.java:768)
> 	at org.apache.derby.impl.jdbc.EmbedPreparedStatement.<init>(EmbedPreparedStatement.java:128)
> 	at org.apache.derby.impl.jdbc.EmbedPreparedStatement20.<init>(EmbedPreparedStatement20.java:82)
> 	at org.apache.derby.impl.jdbc.EmbedPreparedStatement30.<init>(EmbedPreparedStatement30.java:63)
> 	at org.apache.derby.jdbc.Driver30.newEmbedPreparedStatement(Driver30.java:99)
> 	at org.apache.derby.impl.jdbc.EmbedConnection.prepareStatement(EmbedConnection.java:1475)
> 	at org.apache.derby.impl.jdbc.EmbedConnection.prepareStatement(EmbedConnection.java:1356)
> 	at org.apache.derby.impl.drda.DRDAStatement.prepare(DRDAStatement.java:635)
> 	at org.apache.derby.impl.drda.DRDAStatement.explicitPrepare(DRDAStatement.java:596)
> 	at org.apache.derby.impl.drda.DRDAConnThread.parsePRPSQLSTT(DRDAConnThread.java:3618)
> 	at org.apache.derby.impl.drda.DRDAConnThread.processCommands(DRDAConnThread.java:789)
> 	at org.apache.derby.impl.drda.DRDAConnThread.run(DRDAConnThread.java:278)
> Caused by: java.io.IOException: 파일이 이미 있으므로 만들 수 없습니다
(can not create file)
> 	at java.io.RandomAccessFile.open(Native Method)
> 	at java.io.RandomAccessFile.<init>(RandomAccessFile.java:204)
> 	at org.apache.derby.impl.io.DirRandomAccessFile.<init>(DirRandomAccessFile.java:57)
> 	at org.apache.derby.impl.io.DirRandomAccessFile4.<init>(DirRandomAccessFile4.java:57)
> 	at org.apache.derby.impl.io.DirFile4.getRandomAccessFile(DirFile4.java:250)
> 	at org.apache.derby.impl.store.raw.data.RAFContainer.run(RAFContainer.java:1392)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message