db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kathey Marsden <kmarsdende...@sbcglobal.net>
Subject Re: SqlException: Run out of sections to use
Date Thu, 17 Nov 2005 14:01:32 GMT
Dyre.Tjeldvoll@Sun.COM wrote:

>Harrus@gmx.de writes:
>
>  
>
>>Here is the client's stack trace. I have none on the server.
>>org.apache.derby.client.am.SqlException: Run out of sections to use,sections
>>limited to 32k currently
>>	at org.apache.derby.client.am.SectionManager.getSection(Unknown Source)
>>	at org.apache.derby.client.am.SectionManager.getDynamicSection(Unknown
>>Source)
>>	at org.apache.derby.client.am.Statement.flowExecute(Unknown Source)
>>	at org.apache.derby.client.am.Statement.executeUpdateX(Unknown Source)
>>	at org.apache.derby.client.am.Statement.executeUpdate(Unknown Source)
>>
>>The exception occurs after the insert of ~1600 rows in table a and ~23000
>>rows in table b. Each row in table a leads an insert of ~15 rows in table b.
>>After 100 rows in table a and therefore ~1500 rows in table b I call
>>Connection.commit(). I can query the db after the exception occured and it
>>seems that all the commited entries are ok.
>>I can compile the derby sources to get a stack trace with line numbers it it
>>would help.
>>    
>>
>
>  
>

Each section corresponds to a Statement so this would mean that you have
more than 32 thousand statements open.  Unless that is your intention,
you are probably encountering  DERBY-210  which means that you need to
be careful to close all your statements and prepared statements.  They
won't just get garbage collected.   See information on the workaround
and how to  check what statements are open on the server in the comments
for DERBY-210. http://issues.apache.org/jira/browse/DERBY-210.

Also, if you are using Statements for your inserts,  you may want to 
consider using PreparedStatements with dynamic markers('?') instead  for
improved performance and memory usage..
http://db.apache.org/derby/faq.html#derby_faster


Thanks

Kathey






Mime
View raw message