Uploaded image for project: 'Derby'
  1. Derby
  2. DERBY-6054

java.sql.SQLException: Exceeded maximum number of sections 32k in application with many setTransactionIsolation statements

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Not A Problem
    • 10.8.2.2
    • None
    • Network Client
    • None
    • Workaround attached
    • Embedded/Client difference, Seen in production

    Description

      An application that uses OpenJPA and WAS gets the exception below.
      java.sql.SQLException: Exceeded maximum number of sections 32k
      at org.apache.derby.client.am.SQLExceptionFactory.getSQLException(Unknown Source)
      at org.apache.derby.client.am.SqlException.getSQLException(Unknown Source)
      at org.apache.derby.client.am.Statement.executeUpdate(Unknown Source)
      at org.apache.derby.client.am.Connection.setTransactionIsolationX(Unknown Source)
      at org.apache.derby.client.am.Connection.setTransactionIsolation(Unknown Source)
      at org.apache.derby.client.am.LogicalConnection.setTransactionIsolation(Unknown Source)
      at com.ibm.ws.rsadapter.spi.WSRdbManagedConnectionImpl.setTransactionIsolation(WSRdbManagedConnectionImpl.java:4622)
      at com.ibm.ws.rsadapter.jdbc.WSJdbcConnection.setTransactionIsolation(WSJdbcConnection.java:2884)
      at org.apache.openjpa.lib.jdbc.DelegatingConnection.setTransactionIsolation(DelegatingConnection.java:257)
      at org.apache.openjpa.lib.jdbc.DelegatingConnection.setTransactionIsolation(DelegatingConnection.java:257)
      at org.apache.openjpa.lib.jdbc.ConfiguringConnectionDecorator.decorate(ConfiguringConnectionDecorator.java:95)
      at org.apache.openjpa.lib.jdbc.DecoratingDataSource.decorate(DecoratingDataSource.java:100)
      at org.apache.openjpa.lib.jdbc.DecoratingDataSource.getConnection(DecoratingDataSource.java:88)
      at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.connectInternal(JDBCStoreManager.java:879)
      at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.connect(JDBCStoreManager.java:864)

      Looking at the log every time a connection is opened there are two SET CURRENT ISOLATION STATEMENTS, presumably as the isolation is set and then again to reset it for the pool.

      There are exactly 32767 of these for the session before the failure.

      ~/repro$grep 'SET CURRENT ISO' derby.log | grep 'Executing' |
      grep 'SESSIONID = 9' | wc
      32767 983010 8060682

      Only the setTransactionIsolation statements do not seem to be getting garbage collected and teh sections reused. All in all the session has hundreds of thousands of statements that do not have a problem.
      ~/repro $ grep 'Executing' derby.log | grep 'SESSIONID = 9' |
      wc
      364906 30487228 297049149

      Runtimeinfo was not revealing in terms of showing the statements building up. so there is more investigation to do.

      Attachments

        Issue Links

          Activity

            People

              kmarsden Katherine Marsden
              kmarsden Katherine Marsden
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: