IanMeta opened a new issue, #33380:
URL: https://github.com/apache/doris/issues/33380

   ### Search before asking
   
   - [X] I had searched in the 
[issues](https://github.com/apache/doris/issues?q=is%3Aissue) and found no 
similar issues.
   
   
   ### Version
   
   Doris Version: 2.1.1 (recently upgraded from 2.0.0)
   Java Version: 1.8.0_402
   
   ### What's Wrong?
   
   When querying JDBC external tables in 2.1.1, we reached this error after a 
while: 
   ```
   org.jkiss.dbeaver.model.sql.DBSQLException: SQL Error [1105] [HY000]: 
errCode = 2, detailMessage = (xx.xxx.xxx.xxx)[CANCELLED]UdfRuntimeException: 
Initialize datasource failed: 
   CAUSED BY: GetConnectionTimeoutException: wait millis 5002, active 10, 
maxActive 10, creating 0
        at 
org.jkiss.dbeaver.model.impl.jdbc.exec.JDBCStatementImpl.executeStatement(JDBCStatementImpl.java:133)
        at 
org.jkiss.dbeaver.ui.editors.sql.execute.SQLQueryJob.executeStatement(SQLQueryJob.java:583)
        at 
org.jkiss.dbeaver.ui.editors.sql.execute.SQLQueryJob.lambda$1(SQLQueryJob.java:492)
        at 
org.jkiss.dbeaver.model.exec.DBExecUtils.tryExecuteRecover(DBExecUtils.java:190)
        at 
org.jkiss.dbeaver.ui.editors.sql.execute.SQLQueryJob.executeSingleQuery(SQLQueryJob.java:499)
        at 
org.jkiss.dbeaver.ui.editors.sql.execute.SQLQueryJob.extractData(SQLQueryJob.java:947)
        at 
org.jkiss.dbeaver.ui.editors.sql.SQLEditor$QueryResultsContainer.readData(SQLEditor.java:4057)
        at 
org.jkiss.dbeaver.ui.controls.resultset.ResultSetJobDataRead.lambda$0(ResultSetJobDataRead.java:123)
        at 
org.jkiss.dbeaver.model.exec.DBExecUtils.tryExecuteRecover(DBExecUtils.java:190)
        at 
org.jkiss.dbeaver.ui.controls.resultset.ResultSetJobDataRead.run(ResultSetJobDataRead.java:121)
        at 
org.jkiss.dbeaver.ui.controls.resultset.ResultSetViewer$ResultSetDataPumpJob.run(ResultSetViewer.java:5164)
        at org.jkiss.dbeaver.model.runtime.AbstractJob.run(AbstractJob.java:105)
        at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
   Caused by: java.sql.SQLException: errCode = 2, detailMessage = 
(xx.xxx.xxx.xxx)[CANCELLED]UdfRuntimeException: Initialize datasource failed: 
   CAUSED BY: GetConnectionTimeoutException: wait millis 5002, active 10, 
maxActive 10, creating 0
        at 
com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:129)
        at 
com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122)
        at 
com.mysql.cj.jdbc.StatementImpl.executeInternal(StatementImpl.java:763)
        at com.mysql.cj.jdbc.StatementImpl.execute(StatementImpl.java:648)
        at 
org.jkiss.dbeaver.model.impl.jdbc.exec.JDBCStatementImpl.execute(JDBCStatementImpl.java:330)
        at 
org.jkiss.dbeaver.model.impl.jdbc.exec.JDBCStatementImpl.executeStatement(JDBCStatementImpl.java:131)
        ... 12 more
   ```
   
   
   ### What You Expected?
   
   successfully querying the external table.
   
   ### How to Reproduce?
   
   1. In Doris 2.1.1, create a JDBC connection resource and add a valid 
external table
   2. Open multiple connections to Doris and query the external table.
   
   ### Anything Else?
   
   Here are the following things we tried:
   
   1. Increasing `connection_pool_max_size`, helped to increase the time before 
we hit this error again, but even increasing the max pool size to 10000, we 
still eventually hit this error. We suspect that there is a leak and the 
connection pool management.
   2. Decreasing `connection_pool_max_life_time` and 
`jdbc_connection_pool_cache_clear_time_sec` also seemed to help increase the 
number of queries before we hit the error again, but also do not solve the 
issue ultimately.
   3. Interestingly, when we update  `connection_pool_max_size` to any value 
(could be smaller than the previously set value), Doris seems to clear all the 
useless connections from before and we can immediately query the external table 
again.
   
   We have not tried: Installing Doris 2.1.1 from fresh to reproduce this 
error, the bug _may_ be a result of unexpected behaviors from the version 
upgrade from 2.0.0
   
   ### Are you willing to submit PR?
   
   - [ ] 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-unsubscr...@doris.apache.org.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to