在使用obloader导入数据出现(conn=3221618146) maximum open cursors exceeded

【 使用环境 】生产环境
【 OB or 其他组件 】
【 使用版本 】4.3.2
【问题描述】清晰明确描述问题
【复现路径】问题出现前后相关操作
【附件及日志】
错误信息

2024-11-20 14:40:01 [INFO] File: "/data1/kb/output/data/small_oa_169/TABLE/t_order_pay-2.sql" has been parsed finished
2024-11-20 14:40:02 [ERROR] Other Error: java.util.concurrent.ExecutionException: java.sql.SQLTransientConnectionException: (conn=3221618146) maximum open cursors exceeded
	at com.google.common.util.concurrent.AbstractFuture.getDoneValue(AbstractFuture.java:592) ~[guava-32.0.1-jre.jar:?]
	at com.google.common.util.concurrent.AbstractFuture.get(AbstractFuture.java:551) ~[guava-32.0.1-jre.jar:?]
	at com.google.common.util.concurrent.AbstractFuture$TrustedFuture.get(AbstractFuture.java:111) ~[guava-32.0.1-jre.jar:?]
	at com.google.common.util.concurrent.Uninterruptibles.getUninterruptibly(Uninterruptibles.java:247) ~[guava-32.0.1-jre.jar:?]
	at com.google.common.cache.LocalCache$Segment.getAndRecordStats(LocalCache.java:2345) ~[guava-32.0.1-jre.jar:?]
	at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2313) ~[guava-32.0.1-jre.jar:?]
	at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2189) ~[guava-32.0.1-jre.jar:?]
	at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2079) ~[guava-32.0.1-jre.jar:?]
	at com.google.common.cache.LocalCache.get(LocalCache.java:4011) ~[guava-32.0.1-jre.jar:?]
	at com.google.common.cache.LocalCache$LocalManualCache.get(LocalCache.java:4919) ~[guava-32.0.1-jre.jar:?]
	at com.oceanbase.tools.loaddump.writer.oceanbase.JdbcClientWriter.cachedPreparedStatement(JdbcClientWriter.java:229) ~[ob-loader-dumper-4.3.2-RELEASE.jar:?]
	at com.oceanbase.tools.loaddump.writer.oceanbase.JdbcClientWriter$RetryCallback.executeUpdate(JdbcClientWriter.java:596) ~[ob-loader-dumper-4.3.2-RELEASE.jar:?]
	at com.oceanbase.tools.loaddump.writer.oceanbase.JdbcClientWriter$RetryCallback.call(JdbcClientWriter.java:455) ~[ob-loader-dumper-4.3.2-RELEASE.jar:?]
	at com.oceanbase.tools.loaddump.writer.oceanbase.JdbcClientWriter$RetryCallback.call(JdbcClientWriter.java:360) ~[ob-loader-dumper-4.3.2-RELEASE.jar:?]
	at com.github.rholder.retry.AttemptTimeLimiters$NoAttemptTimeLimit.call(AttemptTimeLimiters.java:78) ~[guava-retrying-2.0.0.jar:?]
	at com.github.rholder.retry.Retryer.call(Retryer.java:160) ~[guava-retrying-2.0.0.jar:?]
	at com.oceanbase.tools.loaddump.writer.oceanbase.JdbcClientWriter.onEvent(JdbcClientWriter.java:283) ~[ob-loader-dumper-4.3.2-RELEASE.jar:?]
	at com.oceanbase.tools.loaddump.writer.oceanbase.JdbcClientWriter.onEvent(JdbcClientWriter.java:71) ~[ob-loader-dumper-4.3.2-RELEASE.jar:?]
	at com.lmax.disruptor.WorkProcessor.run(WorkProcessor.java:143) ~[disruptor-3.4.4.jar:?]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) ~[?:1.8.0_372]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) ~[?:1.8.0_372]
	at java.lang.Thread.run(Thread.java:750) ~[?:1.8.0_372]
Caused by: java.sql.SQLTransientConnectionException: (conn=3221618146) maximum open cursors exceeded
	at com.oceanbase.jdbc.internal.util.exceptions.ExceptionFactory.createException(ExceptionFactory.java:128) ~[oceanbase-client-2.4.11.jar:?]
	at com.oceanbase.jdbc.internal.util.exceptions.ExceptionFactory.create(ExceptionFactory.java:202) ~[oceanbase-client-2.4.11.jar:?]
	at com.oceanbase.jdbc.JDBC4ServerPreparedStatement.prepare(JDBC4ServerPreparedStatement.java:311) ~[oceanbase-client-2.4.11.jar:?]
	at com.oceanbase.jdbc.JDBC4ServerPreparedStatement.<init>(JDBC4ServerPreparedStatement.java:159) ~[oceanbase-client-2.4.11.jar:?]
	at com.oceanbase.jdbc.ServerSidePreparedStatement.<init>(ServerSidePreparedStatement.java:78) ~[oceanbase-client-2.4.11.jar:?]
	at com.oceanbase.jdbc.OceanBaseConnection.internalPrepareStatement(OceanBaseConnection.java:799) ~[oceanbase-client-2.4.11.jar:?]
	at com.oceanbase.jdbc.OceanBaseConnection.prepareStatement(OceanBaseConnection.java:536) ~[oceanbase-client-2.4.11.jar:?]
	at com.oceanbase.tools.loaddump.writer.oceanbase.JdbcClientWriter.lambda$cachedPreparedStatement$1(JdbcClientWriter.java:229) ~[ob-loader-dumper-4.3.2-RELEASE.jar:?]
	at com.google.common.cache.LocalCache$LocalManualCache$1.load(LocalCache.java:4924) ~[guava-32.0.1-jre.jar:?]
	at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3570) ~[guava-32.0.1-jre.jar:?]
	at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2312) ~[guava-32.0.1-jre.jar:?]
	... 16 more
Caused by: java.sql.SQLException: maximum open cursors exceeded
	at com.oceanbase.jdbc.internal.com.send.ComStmtPrepare.buildErrorException(ComStmtPrepare.java:181) ~[oceanbase-client-2.4.11.jar:?]
	at com.oceanbase.jdbc.internal.com.send.ComStmtPrepare.read(ComStmtPrepare.java:99) ~[oceanbase-client-2.4.11.jar:?]
	at com.oceanbase.jdbc.internal.protocol.AbstractQueryProtocol.prepare(AbstractQueryProtocol.java:280) ~[oceanbase-client-2.4.11.jar:?]
	at com.oceanbase.jdbc.JDBC4ServerPreparedStatement.prepare(JDBC4ServerPreparedStatement.java:295) ~[oceanbase-client-2.4.11.jar:?]
	at com.oceanbase.jdbc.JDBC4ServerPreparedStatement.<init>(JDBC4ServerPreparedStatement.java:159) ~[oceanbase-client-2.4.11.jar:?]
	at com.oceanbase.jdbc.ServerSidePreparedStatement.<init>(ServerSidePreparedStatement.java:78) ~[oceanbase-client-2.4.11.jar:?]
	at com.oceanbase.jdbc.OceanBaseConnection.internalPrepareStatement(OceanBaseConnection.java:799) ~[oceanbase-client-2.4.11.jar:?]
	at com.oceanbase.jdbc.OceanBaseConnection.prepareStatement(OceanBaseConnection.java:536) ~[oceanbase-client-2.4.11.jar:?]
	at com.oceanbase.tools.loaddump.writer.oceanbase.JdbcClientWriter.lambda$cachedPreparedStatement$1(JdbcClientWriter.java:229) ~[ob-loader-dumper-4.3.2-RELEASE.jar:?]
	at com.google.common.cache.LocalCache$LocalManualCache$1.load(LocalCache.java:4924) ~[guava-32.0.1-jre.jar:?]
	at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3570) ~[guava-32.0.1-jre.jar:?]
	at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2312) ~[guava-32.0.1-jre.jar:?]
	... 16 more

2024-11-20 14:40:02 [ERROR] Other Error: java.util.concurrent.ExecutionException: java.sql.SQLTransientConnectionException: (conn=3221618146) maximum open cursors exceeded
	at com.google.common.util.concurrent.AbstractFuture.getDoneValue(AbstractFuture.java:592) ~[guava-32.0.1-jre.jar:?]
	at com.google.common.util.concurrent.AbstractFuture.get(AbstractFuture.java:551) ~[guava-32.0.1-jre.jar:?]
	at com.google.common.util.concurrent.AbstractFuture$TrustedFuture.get(AbstractFuture.java:111) ~[guava-32.0.1-jre.jar:?]
	at com.google.common.util.concurrent.Uninterruptibles.getUninterruptibly(Uninterruptibles.java:247) ~[guava-32.0.1-jre.jar:?]
	at com.google.common.cache.LocalCache$Segment.getAndRecordStats(LocalCache.java:2345) ~[guava-32.0.1-jre.jar:?]
	at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2313) ~[guava-32.0.1-jre.jar:?]
	at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2189) ~[guava-32.0.1-jre.jar:?]
	at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2079) ~[guava-32.0.1-jre.jar:?]
	at com.google.common.cache.LocalCache.get(LocalCache.java:4011) ~[guava-32.0.1-jre.jar:?]
	at com.google.common.cache.LocalCache$LocalManualCache.get(LocalCache.java:4919) ~[guava-32.0.1-jre.jar:?]
	at com.oceanbase.tools.loaddump.writer.oceanbase.JdbcClientWriter.cachedPreparedStatement(JdbcClientWriter.java:229) ~[ob-loader-dumper-4.3.2-RELEASE.jar:?]
	at com.oceanbase.tools.loaddump.writer.oceanbase.JdbcClientWriter$RetryCallback.executeUpdate(JdbcClientWriter.java:596) ~[ob-loader-dumper-4.3.2-RELEASE.jar:?]
	at com.oceanbase.tools.loaddump.writer.oceanbase.JdbcClientWriter$RetryCallback.call(JdbcClientWriter.java:455) ~[ob-loader-dumper-4.3.2-RELEASE.jar:?]
	at com.oceanbase.tools.loaddump.writer.oceanbase.JdbcClientWriter$RetryCallback.call(JdbcClientWriter.java:360) ~[ob-loader-dumper-4.3.2-RELEASE.jar:?]
	at com.github.rholder.retry.AttemptTimeLimiters$NoAttemptTimeLimit.call(AttemptTimeLimiters.java:78) ~[guava-retrying-2.0.0.jar:?]
	at com.github.rholder.retry.Retryer.call(Retryer.java:160) ~[guava-retrying-2.0.0.jar:?]
	at com.oceanbase.tools.loaddump.writer.oceanbase.JdbcClientWriter.onEvent(JdbcClientWriter.java:283) ~[ob-loader-dumper-4.3.2-RELEASE.jar:?]
	at com.oceanbase.tools.loaddump.writer.oceanbase.JdbcClientWriter.onEvent(JdbcClientWriter.java:71) ~[ob-loader-dumper-4.3.2-RELEASE.jar:?]
	at com.lmax.disruptor.WorkProcessor.run(WorkProcessor.java:143) ~[disruptor-3.4.4.jar:?]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) ~[?:1.8.0_372]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) ~[?:1.8.0_372]
	at java.lang.Thread.run(Thread.java:750) ~[?:1.8.0_372]
Caused by: java.sql.SQLTransientConnectionException: (conn=3221618146) maximum open cursors exceeded
	at com.oceanbase.jdbc.internal.util.exceptions.ExceptionFactory.createException(ExceptionFactory.java:128) ~[oceanbase-client-2.4.11.jar:?]
	at com.oceanbase.jdbc.internal.util.exceptions.ExceptionFactory.create(ExceptionFactory.java:202) ~[oceanbase-client-2.4.11.jar:?]
	at com.oceanbase.jdbc.JDBC4ServerPreparedStatement.prepare(JDBC4ServerPreparedStatement.java:311) ~[oceanbase-client-2.4.11.jar:?]
	at com.oceanbase.jdbc.JDBC4ServerPreparedStatement.<init>(JDBC4ServerPreparedStatement.java:159) ~[oceanbase-client-2.4.11.jar:?]
	at com.oceanbase.jdbc.ServerSidePreparedStatement.<init>(ServerSidePreparedStatement.java:78) ~[oceanbase-client-2.4.11.jar:?]
	at com.oceanbase.jdbc.OceanBaseConnection.internalPrepareStatement(OceanBaseConnection.java:799) ~[oceanbase-client-2.4.11.jar:?]
	at com.oceanbase.jdbc.OceanBaseConnection.prepareStatement(OceanBaseConnection.java:536) ~[oceanbase-client-2.4.11.jar:?]
	at com.oceanbase.tools.loaddump.writer.oceanbase.JdbcClientWriter.lambda$cachedPreparedStatement$1(JdbcClientWriter.java:229) ~[ob-loader-dumper-4.3.2-RELEASE.jar:?]
	at com.google.common.cache.LocalCache$LocalManualCache$1.load(LocalCache.java:4924) ~[guava-32.0.1-jre.jar:?]
	at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3570) ~[guava-32.0.1-jre.jar:?]
	at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2312) ~[guava-32.0.1-jre.jar:?]
	... 16 more
Caused by: java.sql.SQLException: maximum open cursors exceeded
	at com.oceanbase.jdbc.internal.com.send.ComStmtPrepare.buildErrorException(ComStmtPrepare.java:181) ~[oceanbase-client-2.4.11.jar:?]
	at com.oceanbase.jdbc.internal.com.send.ComStmtPrepare.read(ComStmtPrepare.java:99) ~[oceanbase-client-2.4.11.jar:?]
	at com.oceanbase.jdbc.internal.protocol.AbstractQueryProtocol.prepare(AbstractQueryProtocol.java:280) ~[oceanbase-client-2.4.11.jar:?]
	at com.oceanbase.jdbc.JDBC4ServerPreparedStatement.prepare(JDBC4ServerPreparedStatement.java:295) ~[oceanbase-client-2.4.11.jar:?]
	at com.oceanbase.jdbc.JDBC4ServerPreparedStatement.<init>(JDBC4ServerPreparedStatement.java:159) ~[oceanbase-client-2.4.11.jar:?]
	at com.oceanbase.jdbc.ServerSidePreparedStatement.<init>(ServerSidePreparedStatement.java:78) ~[oceanbase-client-2.4.11.jar:?]
	at com.oceanbase.jdbc.OceanBaseConnection.internalPrepareStatement(OceanBaseConnection.java:799) ~[oceanbase-client-2.4.11.jar:?]
	at com.oceanbase.jdbc.OceanBaseConnection.prepareStatement(OceanBaseConnection.java:536) ~[oceanbase-client-2.4.11.jar:?]
	at com.oceanbase.tools.loaddump.writer.oceanbase.JdbcClientWriter.lambda$cachedPreparedStatement$1(JdbcClientWriter.java:229) ~[ob-loader-dumper-4.3.2-RELEASE.jar:?]
	at com.google.common.cache.LocalCache$LocalManualCache$1.load(LocalCache.java:4924) ~[guava-32.0.1-jre.jar:?]
	at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3570) ~[guava-32.0.1-jre.jar:?]
	at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2312) ~[guava-32.0.1-jre.jar:?]
	... 16 more

目前


open_cursors 已调整 还是出现这个问题
执行的命令

./obld/bin/obloader -h 192.168.254.22 -P 2881 -u root@tpcc_tenant -p 'DevOps00__'  -D small_oa_169 --ddl   --sql --no-sys  --all  -f output

麻烦协助下,谢谢

1 个赞

麻烦发下obloader版本

可以参考下这个帖子

oceanbase 客户端 window 使用导出功能 报错maximum open cursors exceededrib4ed_gaMTIwMjU5NTAzNC4xNzE0OTc1MTY1_ga_T35KTM57DZ*MTczMjA4MTA0NS4zMzQuMS4xNzMyMDg2MjA4LjM4LjAuMA…

obloader的版本是4.3.2-RELEASE
游标在租户下面调整到最大了,还是出现这个错误

就是修改游标的值,我已经修改到最大了,还是出现同样的问题

参考这个解决方案看下

好的 谢谢 我先试试

我也遇到过这个问题,像旭辉老师说的调整完 游标参数open_cursors(租户级别参数) 后解决