You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2021/05/25 02:08:53 UTC

[GitHub] [shardingsphere] chenxk opened a new issue #10449: Exceeded the maximum number of open cursors

chenxk opened a new issue #10449:
URL: https://github.com/apache/shardingsphere/issues/10449


   500+ tables in my Oracle DB.
   When the application running ,  an exception occurred: Exceeded the maximum number of open cursors
   
   I found the problem at this class:
   org.apache.shardingsphere.sql.parser.binder.metadata.column.ColumnMetaDataLoader.load(final Connection connection, final String table, final String databaseType) throws SQLException
   
   ----------Exception occurred -----------
   try (ResultSet resultSet = connection.createStatement().executeQuery(generateEmptyResultSQL(table, databaseType))) {
       for (String each : columnNames) {
           isCaseSensitives.add(resultSet.getMetaData().isCaseSensitive(resultSet.findColumn(each)));
       }
   }
   
   **connection.createStatement()** , created a statement  ,but  do not close .
   
   So i modified  code  as:
   
   Statement statement = connection.createStatement();
       try (ResultSet resultSet = statement.executeQuery(generateEmptyResultSQL(table, databaseType))) {
           for (String each : columnNames) {
               isCaseSensitives.add(resultSet.getMetaData().isCaseSensitive(resultSet.findColumn(each)));
           }
       }
       statement.close();
   
   Fixed the problem !!!
   
   
   **Looking forward to your better solution。**
   
   
   
   ### Which version of ShardingSphere did you use?
   4.1.1
   
   ### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
   ShardingSphere-JDBC
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] tristaZero closed issue #10449: Exceeded the maximum number of open cursors

Posted by GitBox <gi...@apache.org>.
tristaZero closed issue #10449:
URL: https://github.com/apache/shardingsphere/issues/10449


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] tristaZero commented on issue #10449: Exceeded the maximum number of open cursors

Posted by GitBox <gi...@apache.org>.
tristaZero commented on issue #10449:
URL: https://github.com/apache/shardingsphere/issues/10449#issuecomment-848651677


   #10471 fixed


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] tristaZero commented on issue #10449: Exceeded the maximum number of open cursors

Posted by GitBox <gi...@apache.org>.
tristaZero commented on issue #10449:
URL: https://github.com/apache/shardingsphere/issues/10449#issuecomment-847526422


   Hi @chenxk ,
   
   Thanks for your report. 
   I just gave a look at the [master branch](https://github.com/apache/shardingsphere/blob/master/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/metadata/schema/builder/loader/ColumnMetaDataLoader.java), and this issue still exists.
   Would you like to help this community fix it for the master branch? If you like, [guide](https://shardingsphere.apache.org/community/cn/contribute/contributor/) will give you some hints. Otherwise, please still comment here so that I can call help from others.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] chenxk commented on issue #10449: Exceeded the maximum number of open cursors

Posted by GitBox <gi...@apache.org>.
chenxk commented on issue #10449:
URL: https://github.com/apache/shardingsphere/issues/10449#issuecomment-847549896


   > Hi @chenxk ,
   > 
   > Thanks for your report.
   > I just gave a look at the [master branch](https://github.com/apache/shardingsphere/blob/master/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/metadata/schema/builder/loader/ColumnMetaDataLoader.java), and this issue still exists.
   > Would you like to help this community fix it for the master branch? If you like, [guide](https://shardingsphere.apache.org/community/cn/contribute/contributor/) will give you some hints. Otherwise, please still comment here so that I can call help from others.
   
   OK, It's my pleasure。


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org