You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by "Slashoper (via GitHub)" <gi...@apache.org> on 2023/10/24 03:34:09 UTC

[I] [Bug] [worker] the sql task reach the limit of max conn [dolphinscheduler]

Slashoper opened a new issue, #15068:
URL: https://github.com/apache/dolphinscheduler/issues/15068

   ### Search before asking
   
   - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues.
   
   
   ### What happened
   
   ![image](https://github.com/apache/dolphinscheduler/assets/19834014/10d96700-c2bc-44f8-90e1-99b97e93f834)
   org.apache.dolphinscheduler.plugin.datasource.api.plugin.DataSourceClientProvider.lambda$getConnection$1(DataSourceClientProvider.java:79)
   	at com.google.common.cache.LocalCache$LocalManualCache$1.load(LocalCache.java:4868)
   	at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3533)
   	at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2282)
   	at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2159)
   	at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2049)
   	... 14 common frames omitted
   Caused by: org.springframework.jdbc.CannotGetJdbcConnectionException: Failed to obtain JDBC Connection; nested exception is java.sql.SQLSyntaxErrorException: Reach limit of connections
   	at org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:83)
   	at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:376)
   	at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:431)
   	at org.apache.dolphinscheduler.plugin.datasource.api.client.CommonDataSourceClient.checkClient(CommonDataSourceClient.java:96)
   	... 23 common frames omitted
   Caused by: java.sql.SQLSyntaxErrorException: Reach limit of connections
   	at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:120)
   	at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122)
   	at com.mysql.cj.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:828)
   	at com.mysql.cj.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:448)
   	at com.mysql.cj.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:241)
   	at com.mysql.cj.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:198)
   	at com.zaxxer.hikari.util.DriverDataSource.getConnection(DriverDataSource.java:138)
   	at com.zaxxer.hikari.pool.PoolBase.newConnection(PoolBase.java:364)
   	at com.zaxxer.hikari.pool.PoolBase.newPoolEntry(PoolBase.java:206)
   	at com.zaxxer.hikari.pool.HikariPool.createPoolEntry(HikariPool.java:476)
   	at com.zaxxer.hikari.pool.HikariPool.checkFailFast(HikariPool.java:561)
   	at com.zaxxer.hikari.pool.HikariPool.<init>(HikariPool.java:115)
   	at com.zaxxer.hikari.HikariDataSource.getConnection(HikariDataSource.java:112)
   	at org.springframework.jdbc.datasource.DataSourceUtils.fetchConnection(DataSourceUtils.java:159)
   	at org.springframework.jdbc.datasource.DataSourceUtils.doGetConnection(DataSourceUtils.java:117)
   	at org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:80)
   	... 26 common frames omitted
   [INFO] 2023-10-24 11:05:22.275 +0800 - Get a exception when execute the task, will send the task execute result to master, the current task execute result is TaskExecutionStatus{code=6, desc='failure'}
   
   ### What you expected to happen
   
   There are many SQL tasks in the workflow definition, and the corresponding number of connections has not been released. According to logic, tasks are executed one by one, and once the execution is completed, the session is released.
   
   
   ### How to reproduce
   
   ![image](https://github.com/apache/dolphinscheduler/assets/19834014/2139f53e-9582-456a-9822-0051bed7fcc7)
   
   
   ### Anything else
   
   _No response_
   
   ### Version
   
   3.1.x
   
   ### Are you willing to submit PR?
   
   - [X] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
   


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@dolphinscheduler.apache.org.apache.org

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