This is an automated email from the ASF dual-hosted git repository.

luzhijing pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris-website.git


The following commit(s) were added to refs/heads/master by this push:
     new f49abc69804 (improvement)(jdbc catalog) add some jdbc catalog faq 
(#928)
f49abc69804 is described below

commit f49abc698047c8eb74a41d7b28a3ea4d62c8437f
Author: zy-kkk <zhongy...@gmail.com>
AuthorDate: Wed Jul 31 22:20:53 2024 +0800

    (improvement)(jdbc catalog) add some jdbc catalog faq (#928)
---
 docs/lakehouse/database/jdbc.md                    | 29 ++++++++++++++
 docs/lakehouse/database/mysql.md                   | 46 ++++++++++++++++++++++
 .../current/lakehouse/database/jdbc.md             | 29 ++++++++++++++
 .../current/lakehouse/database/mysql.md            | 46 ++++++++++++++++++++++
 .../version-2.0/lakehouse/database/jdbc.md         | 29 ++++++++++++++
 .../version-2.0/lakehouse/database/mysql.md        | 46 ++++++++++++++++++++++
 .../version-2.1/lakehouse/database/jdbc.md         | 29 ++++++++++++++
 .../version-2.1/lakehouse/database/mysql.md        | 46 ++++++++++++++++++++++
 .../version-3.0/lakehouse/database/jdbc.md         | 29 ++++++++++++++
 .../version-3.0/lakehouse/database/mysql.md        | 46 ++++++++++++++++++++++
 .../version-2.0/lakehouse/database/jdbc.md         | 29 ++++++++++++++
 .../version-2.0/lakehouse/database/mysql.md        | 46 ++++++++++++++++++++++
 .../version-2.1/lakehouse/database/jdbc.md         | 29 ++++++++++++++
 .../version-2.1/lakehouse/database/mysql.md        | 46 ++++++++++++++++++++++
 .../version-3.0/lakehouse/database/jdbc.md         | 29 ++++++++++++++
 .../version-3.0/lakehouse/database/mysql.md        | 46 ++++++++++++++++++++++
 16 files changed, 600 insertions(+)

diff --git a/docs/lakehouse/database/jdbc.md b/docs/lakehouse/database/jdbc.md
index 6adf0d1758c..803a468bf57 100644
--- a/docs/lakehouse/database/jdbc.md
+++ b/docs/lakehouse/database/jdbc.md
@@ -316,3 +316,32 @@ Through the `CALL EXECUTE_STMT()` command, Doris will 
directly send the SQL stat
 - Only users with LOAD permissions on the Catalog can execute the `CALL 
EXECUTE_STMT()` command.
 - Only users with SELECT permissions on Catalog can execute the `query()` 
table function.
 - The supported data types of the data read by the `query` table function are 
consistent with the data types supported by the queried catalog type.
+
+## Troubleshooting connection pool issues
+
+1. In versions less than 2.0.5, the connection pool related configuration can 
only be configured in JAVA_OPTS of BE conf, refer to version 2.0.4 
[be.conf](https://github.com/apache/doris/blob/ 2.0.4-rc06/conf/be.conf#L22).
+2. In versions 2.0.5 and later, connection pool related configurations can be 
configured in the Catalog properties, refer to [Connection Pool 
Properties](#Connection Pool Properties).
+3. The connection pool used by Doris was changed from Druid to HikariCP 
starting from 2.0.10 (2.0 Release) and 2.1.3 (2.1 Release), so the connection 
pool related errors and troubleshooting methods are different, refer to the 
following
+
+* Druid connection pool version
+    * Initialize datasource failed: CAUSED BY: GetConnectionTimeoutException: 
wait millis 5006, active 10, maxActive 10, creating 1
+        * Reason 1: Too many queries cause the number of connections to exceed 
the configuration
+        * Reason 2: The connection pool count is abnormal and the active count 
does not decrease.
+        * Solution
+            * alter catalog <catalog_name> set properties 
('connection_pool_max_size' = '100'); Temporarily increase the connection pool 
capacity by adjusting the number of connections, and the connection pool cache 
can be refreshed in this way
+            * Upgrade to replace the connection pool to Hikari version
+        * Initialize datasource failed: CAUSED BY: 
GetConnectionTimeoutException: wait millis 5006, active 10, maxActive 0, 
creating 1
+            * Reason 1: Network failure
+            * Reason 2: The network latency is high, causing the connection 
creation to take more than 5s
+            * Solution
+                * Check network
+                * alter catalog <catalog_name> set properties 
('connection_pool_max_wait' = '10000'); Increase the timeout
+* HikariCP connection pool version
+    * HikariPool-2 - Connection is not available, request timed out after 
5000ms
+        * Reason 1: Network failure
+        * Reason 2: The network delay is high, causing the connection creation 
to take more than 5s
+        * Reason 3: Too many queries cause the number of connections to exceed 
the configuration
+        * Solution
+            * Check network
+            * alter catalog <catalog_name> set properties 
('connection_pool_max_size' = '100'); Increase the number of connections
+            * alter catalog <catalog_name> set properties 
('connection_pool_max_wait_time' = '10000'); Increase the timeout
diff --git a/docs/lakehouse/database/mysql.md b/docs/lakehouse/database/mysql.md
index bbcb3a13492..df42aae0fc7 100644
--- a/docs/lakehouse/database/mysql.md
+++ b/docs/lakehouse/database/mysql.md
@@ -164,6 +164,41 @@ If you have the limit keyword in the query, Doris will 
push the limit down to My
 
 Doris will automatically add the escape character (``) to the field names and 
table names in the query statements sent to MySQL to avoid conflicts between 
field names, table names and MySQL internal keywords.
 
+## Troubleshoot connection exceptions
+
+* Communications link failure The last packet successfully received from the 
server was 7 milliseconds ago.
+   * reason:
+      * Internet problem:
+         * The network is unstable or the connection is interrupted.
+         * Network latency between client and server is too high.
+      * MySQL server settings
+         * The MySQL server may be configured with connection timeout 
parameters, such as wait_timeout or interactive_timeout, causing the connection 
to timeout and be closed.
+      * Firewall settings
+         * Firewall rules may be blocking communication between the client and 
the server.
+      * Connection pool settings
+         * The configuration connection_pool_max_life_time in the connection 
pool may cause the connection to be closed or recycled, or the connection may 
not be detected in time.
+      * Server resource issues
+         * The MySQL server may have insufficient resources to handle new 
connection requests.
+      * Client configuration
+         * Client JDBC driver configuration error, for example, the 
autoReconnect parameter is not set or set improperly.
+   * solve
+      * Check network connection:
+         * Confirm that the network connection between the client and the 
server is stable to avoid excessive network latency.
+      * Check MySQL server configuration:
+         * Review and adjust the MySQL server's wait_timeout and 
interactive_timeout parameters to ensure they are set appropriately.
+      * Check firewall configuration:
+         * Verify that firewall rules allow communication between client and 
server.
+      * Adjust connection pool settings:
+         * Check and adjust the connection pool configuration parameter 
connection_pool_max_life_time to ensure it is smaller than MySQL's wait_timeout 
and interactive_timeout parameters and larger than the SQL with the longest 
execution time
+      * Monitor server resources:
+         * Monitor the resource usage of the MySQL server to ensure that there 
are sufficient resources to handle connection requests.
+      * Optimize client configuration:
+         * Confirm that the configuration parameters of the JDBC driver are 
correct, such as autoReconnect=true, to ensure that the connection can 
automatically reconnect after being interrupted.
+
+* java.io.EOFException MESSAGE: Can not read response from server. Expected to 
read 819 bytes, read 686 bytes before connection was unexpectedly lost.
+   * Reason: The connection was killed by MySQL or MySQL crashed
+   * Solution: Check whether MySQL has a mechanism to actively kill 
connections, or whether MySQL crashes because of too large a query.
+
 ## FAQ
 
 1. The emoji expressions read and written in MySQL are garbled.
@@ -285,3 +320,14 @@ Doris will automatically add the escape character (``) to 
the field names and ta
     ```
 
 7. When querying MySQL, if you are stuck for a long time and no results are 
returned, or if you are stuck for a long time and a large number of write lock 
logs appear in fe.warn.log, you can try adding socketTimeout to the URL, for 
example: `jdbc:mysql ://host:port/database?socketTimeout=30000`, prevents the 
JDBC client from waiting indefinitely after the connection is closed by MySQL.
+
+8. In the process of using MySQL Catalog, it is found that the JVM memory or 
the number of Threads in FE continues to grow and does not decrease, and a 
Forward to master connection timed out error may appear at the same time.
+
+   Print the FE thread stack `jstack fe_pid > fe.js`. If a large number of 
`mysql-cj-abandoned-connection-cleanup` threads appear, it means there is a 
problem with the MySQL JDBC driver.
+
+   Proceed as follows:
+
+   1. Upgrade the MySQL JDBC driver to version 8.0.31 and above
+   2. Add the `-Dcom.mysql.cj.disableAbandonedConnectionCleanup=true` 
parameter to JAVA_OPTS in the FE and BE conf files, disable the connection 
cleanup function of the MySQL JDBC driver, and restart the cluster
+
+   **Note:** If the version of Doris is 2.0.13 and above (2.0 Release), or 
2.1.5 and above (2.1 Release), there is no need to increase this parameter, 
because Doris has disabled the connection cleaning function of the MySQL JDBC 
driver by default. . Just change the MySQL JDBC driver version. However, the 
Doris cluster needs to be restarted to clean up the previous Threads.
diff --git 
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/lakehouse/database/jdbc.md 
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/lakehouse/database/jdbc.md
index 7a33b29a379..57a44e04a1e 100644
--- 
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/lakehouse/database/jdbc.md
+++ 
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/lakehouse/database/jdbc.md
@@ -318,3 +318,32 @@ select * from query("catalog" = "jdbc_catalog", "query" = 
"select * from db_name
 - 只有对 Catalog 有 LOAD 权限的用户,才能执行`CALL EXECUTE_STMT()`命令。
 - 只有对 Catalog 有 SELECT 权限的用户,才能执行`query()`表函数。
 - `query` 表函数读取到的的数据,数据类型的支持与所查询的 catalog 类型支持的数据类型一致。
+
+## 连接池问题排查
+
+1. 在小于 2.0.5 的版本,连接池相关配置只能在 BE conf 的 JAVA_OPTS 中配置,参考 2.0.4 版本的 
[be.conf](https://github.com/apache/doris/blob/2.0.4-rc06/conf/be.conf#L22)。
+2. 在 2.0.5 及之后的版本,连接池相关配置可以在 Catalog 属性中配置,参考 [连接池属性](#连接池属性)。
+3. Doris 使用的连接池在 2.0.10(2.0 Release)和 2.1.3(2.1 Release)开始从 Druid 换为 
HikariCP,故连接池相关报错以及原因排查方式有所不同,参考如下
+
+* Druid 连接池版本
+    * Initialize datasource failed:  CAUSED BY: GetConnectionTimeoutException: 
wait millis 5006, active 10, maxActive 10, creating 1
+        * 原因 1:查询太多导致连接个数超出配置
+        * 原因 2:连接池计数异常导致活跃计数未下降
+        * 解决方法
+            * alter catalog <catalog_name> set properties 
('connection_pool_max_size' = '100'); 暂时通过调整连接数来增大连接池容量,且可以通过这种方式刷新连接池缓存
+            * 升级到更换连接池到 Hikari 版本
+        * Initialize datasource failed:  CAUSED BY: 
GetConnectionTimeoutException: wait millis 5006, active 10, maxActive 0, 
creating 1
+            * 原因 1:网络不通
+            * 原因 2:网络延迟高,导致创建连接超过 5s
+            * 解决方法
+                * 检查网络
+                * alter catalog <catalog_name> set properties 
('connection_pool_max_wait' = '10000'); 调大超时时间
+* HikariCP 连接池版本
+    * HikariPool-2 - Connection is not available, request timed out after 
5000ms
+        * 原因 1:网络不通
+        * 原因 2:网络延迟高,导致创建连接超过 5s
+        * 原因 3:查询太多导致连接个数超出配置
+        * 解决方法
+            * 检查网络
+            * alter catalog <catalog_name> set properties 
('connection_pool_max_size' = '100'); 调大连接个数
+            * alter catalog <catalog_name> set properties 
('connection_pool_max_wait_time' = '10000'); 调大超时时间
diff --git 
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/lakehouse/database/mysql.md 
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/lakehouse/database/mysql.md
index 1576fb0ea41..0ea99868186 100644
--- 
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/lakehouse/database/mysql.md
+++ 
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/lakehouse/database/mysql.md
@@ -163,6 +163,41 @@ Doris 会在 Catalog 中维护表的统计信息,以便在执行查询时能
 
 Doris 会在下发到 MySQL 的查询语句中,自动在字段名与表名上加上转义符:(``),以避免字段名与表名与 MySQL 内部关键字冲突。
 
+## 连接异常排查
+
+* Communications link failure The last packet successfully received from the 
server was 7 milliseconds ago.
+    * 原因:
+        * 网络问题:
+            * 网络不稳定或连接中断。
+            * 客户端和服务器之间的网络延迟过高。
+        * MySQL 服务器设置
+            * MySQL 服务器可能配置了连接超时参数,例如 wait_timeout 或 
interactive_timeout,导致连接超时被关闭。
+        * 防火墙设置
+            * 防火墙规则可能阻止了客户端与服务器之间的通信。
+        * 连接池设置
+            * 连接池中的配置 connection_pool_max_life_time 可能导致连接被关闭或回收,或者未及时探活
+        * 服务器资源问题
+            * MySQL 服务器可能资源不足,无法处理新的连接请求。
+        * 客户端配置
+            * 客户端 JDBC 驱动配置错误,例如 autoReconnect 参数未设置或设置不当。
+    * 解决
+        * 检查网络连接:
+            * 确认客户端和服务器之间的网络连接稳定,避免网络延迟过高。
+        * 检查 MySQL 服务器配置:
+            * 查看并调整 MySQL 服务器的 wait_timeout 和 interactive_timeout 参数,确保它们设置合理。
+        * 检查防火墙配置:
+            * 确认防火墙规则允许客户端与服务器之间的通信。
+        * 调整连接池设置:
+            * 检查并调整连接池的配置参数 connection_pool_max_life_time,确保小于 MySQL 
的wait_timeout 和 interactive_timeout 参数并大于执行时间最长的 SQL
+        * 监控服务器资源:
+            *  监控 MySQL 服务器的资源使用情况,确保有足够的资源处理连接请求。
+        * 优化客户端配置:
+            * 确认 JDBC 驱动的配置参数正确,例如 autoReconnect=true,确保连接能在中断后自动重连。
+
+* java.io.EOFException MESSAGE: Can not read response from server. Expected to 
read 819 bytes, read 686 bytes before connection was unexpectedly lost.
+    * 原因:连接被 MySQL Kill 或者 MySQL 宕机
+    * 解决:检查 MySQL 是否有主动 kill 连接的机制,或者是否因为查询过大查崩 MySQL
+
 ## 常见问题
 
 1. 读写 MySQL 的 emoji 表情出现乱码
@@ -284,3 +319,14 @@ Doris 会在下发到 MySQL 的查询语句中,自动在字段名与表名上
     ```
 
 7. 查询 MySQL 的时候,出现长时间卡住没有返回结果,或着卡住很长时间并且 fe.warn.log 中出现出现大量 write lock 
日志,可以尝试在 URL 添加 socketTimeout 
,例如:`jdbc:mysql://host:port/database?socketTimeout=30000`,防止 JDBC 客户端 在被 MySQL 
关闭连接后无限等待。
+
+8. 在使用 MySQL Catalog 的过程中发现 FE 的 JVM 内存或 Threads 数持续增长不减少,并可能同时出现 Forward to 
master connection timed out 报错
+
+   打印 FE 线程堆栈 `jstack fe_pid > fe.js`,如果出现大量 
`mysql-cj-abandoned-connection-cleanup` 线程,说明是 MySQL JDBC 驱动的问题。
+
+   按照如下方式处理:
+
+   1. 升级 MySQL JDBC 驱动到 8.0.31 及以上版本
+   2. 在 FE 和 BE conf 文件的 JAVA_OPTS 中增加 
`-Dcom.mysql.cj.disableAbandonedConnectionCleanup=true` 参数,禁用 MySQL JDBC 
驱动的连接清理功能,并重启集群
+
+   **注意:** 如果 Doris 的版本在 2.0.13 及以上(2.0 Release),或 2.1.5 及以上(2.1 
Release)则无需增加该参数,因为 Doris 已经默认禁用了 MySQL JDBC 驱动的连接清理功能。只需更换 MySQL JDBC 
驱动版本即可。但是需要重启 Doris 集群来清理掉之前的 Threads。
diff --git 
a/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.0/lakehouse/database/jdbc.md
 
b/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.0/lakehouse/database/jdbc.md
index 86719927dd0..59d1d2caf7a 100644
--- 
a/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.0/lakehouse/database/jdbc.md
+++ 
b/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.0/lakehouse/database/jdbc.md
@@ -212,3 +212,32 @@ SHOW TABLES FROM mysql.test;
 ```sql
 SELECT * FROM mysql.test.table;
 ```
+
+## 连接池问题排查
+
+1. 在小于 2.0.5 的版本,连接池相关配置只能在 BE conf 的 JAVA_OPTS 中配置,参考 2.0.4 版本的 
[be.conf](https://github.com/apache/doris/blob/2.0.4-rc06/conf/be.conf#L22)。
+2. 在 2.0.5 及之后的版本,连接池相关配置可以在 Catalog 属性中配置,参考 [连接池属性](#连接池属性)。
+3. Doris 使用的连接池在 2.0.10(2.0 Release)和 2.1.3(2.1 Release)开始从 Druid 换为 
HikariCP,故连接池相关报错以及原因排查方式有所不同,参考如下
+
+* Druid 连接池版本 
+  * Initialize datasource failed:  CAUSED BY: GetConnectionTimeoutException: 
wait millis 5006, active 10, maxActive 10, creating 1 
+    * 原因 1:查询太多导致连接个数超出配置
+    * 原因 2:连接池计数异常导致活跃计数未下降 
+    * 解决方法
+      * alter catalog <catalog_name> set properties 
('connection_pool_max_size' = '100'); 暂时通过调整连接数来增大连接池容量,且可以通过这种方式刷新连接池缓存
+      * 升级到更换连接池到 Hikari 版本
+    * Initialize datasource failed:  CAUSED BY: GetConnectionTimeoutException: 
wait millis 5006, active 10, maxActive 0, creating 1
+      * 原因 1:网络不通
+      * 原因 2:网络延迟高,导致创建连接超过 5s 
+      * 解决方法
+        * 检查网络
+        * alter catalog <catalog_name> set properties 
('connection_pool_max_wait' = '10000'); 调大超时时间
+* HikariCP 连接池版本 
+  * HikariPool-2 - Connection is not available, request timed out after 5000ms 
+    * 原因 1:网络不通
+    * 原因 2:网络延迟高,导致创建连接超过 5s
+    * 原因 3:查询太多导致连接个数超出配置 
+    * 解决方法
+      * 检查网络
+      * alter catalog <catalog_name> set properties 
('connection_pool_max_size' = '100'); 调大连接个数
+      * alter catalog <catalog_name> set properties 
('connection_pool_max_wait_time' = '10000'); 调大超时时间
diff --git 
a/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.0/lakehouse/database/mysql.md
 
b/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.0/lakehouse/database/mysql.md
index b7ac236e41e..351ff8a7c03 100644
--- 
a/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.0/lakehouse/database/mysql.md
+++ 
b/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.0/lakehouse/database/mysql.md
@@ -160,6 +160,41 @@ Doris 会在 Catalog 中维护表的统计信息,以便在执行查询时能
 
 Doris 会在下发到 MySQL 的查询语句中,自动在字段名与表名上加上转义符:(``),以避免字段名与表名与 MySQL 内部关键字冲突。
 
+## 连接异常排查
+
+* Communications link failure The last packet successfully received from the 
server was 7 milliseconds ago.
+    * 原因:
+        * 网络问题:
+            * 网络不稳定或连接中断。
+            * 客户端和服务器之间的网络延迟过高。
+        * MySQL 服务器设置
+            * MySQL 服务器可能配置了连接超时参数,例如 wait_timeout 或 
interactive_timeout,导致连接超时被关闭。
+        * 防火墙设置
+            * 防火墙规则可能阻止了客户端与服务器之间的通信。
+        * 连接池设置
+            * 连接池中的配置 connection_pool_max_life_time 可能导致连接被关闭或回收,或者未及时探活
+        * 服务器资源问题
+            * MySQL 服务器可能资源不足,无法处理新的连接请求。
+        * 客户端配置
+            * 客户端 JDBC 驱动配置错误,例如 autoReconnect 参数未设置或设置不当。
+    * 解决
+        * 检查网络连接:
+            * 确认客户端和服务器之间的网络连接稳定,避免网络延迟过高。
+        * 检查 MySQL 服务器配置:
+            * 查看并调整 MySQL 服务器的 wait_timeout 和 interactive_timeout 参数,确保它们设置合理。
+        * 检查防火墙配置:
+            * 确认防火墙规则允许客户端与服务器之间的通信。
+        * 调整连接池设置:
+            * 检查并调整连接池的配置参数 connection_pool_max_life_time,确保小于 MySQL 
的wait_timeout 和 interactive_timeout 参数并大于执行时间最长的 SQL
+        * 监控服务器资源:
+            *  监控 MySQL 服务器的资源使用情况,确保有足够的资源处理连接请求。
+        * 优化客户端配置:
+            * 确认 JDBC 驱动的配置参数正确,例如 autoReconnect=true,确保连接能在中断后自动重连。
+
+* java.io.EOFException MESSAGE: Can not read response from server. Expected to 
read 819 bytes, read 686 bytes before connection was unexpectedly lost.
+    * 原因:连接被 MySQL Kill 或者 MySQL 宕机
+    * 解决:检查 MySQL 是否有主动 kill 连接的机制,或者是否因为查询过大查崩 MySQL
+
 ## 常见问题
 
 1. 读写 MySQL 的 emoji 表情出现乱码
@@ -281,3 +316,14 @@ Doris 会在下发到 MySQL 的查询语句中,自动在字段名与表名上
     ```
 
 7. 查询 MySQL 的时候,出现长时间卡住没有返回结果,或着卡住很长时间并且 fe.warn.log 中出现出现大量 write lock 
日志,可以尝试在 URL 添加 socketTimeout 
,例如:`jdbc:mysql://host:port/database?socketTimeout=30000`,防止 JDBC 客户端 在被 MySQL 
关闭连接后无限等待。
+
+8. 在使用 MySQL Catalog 的过程中发现 FE 的 JVM 内存或 Threads 数持续增长不减少,并可能同时出现 Forward to 
master connection timed out 报错
+
+   打印 FE 线程堆栈 `jstack fe_pid > fe.js`,如果出现大量 
`mysql-cj-abandoned-connection-cleanup` 线程,说明是 MySQL JDBC 驱动的问题。
+
+   按照如下方式处理:
+
+   1. 升级 MySQL JDBC 驱动到 8.0.31 及以上版本
+   2. 在 FE 和 BE conf 文件的 JAVA_OPTS 中增加 
`-Dcom.mysql.cj.disableAbandonedConnectionCleanup=true` 参数,禁用 MySQL JDBC 
驱动的连接清理功能,并重启集群
+
+   **注意:** 如果 Doris 的版本在 2.0.13 及以上(2.0 Release),或 2.1.5 及以上(2.1 
Release)则无需增加该参数,因为 Doris 已经默认禁用了 MySQL JDBC 驱动的连接清理功能。只需更换 MySQL JDBC 
驱动版本即可。但是需要重启 Doris 集群来清理掉之前的 Threads。
diff --git 
a/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/lakehouse/database/jdbc.md
 
b/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/lakehouse/database/jdbc.md
index e39b8595f49..2a8e593d81d 100644
--- 
a/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/lakehouse/database/jdbc.md
+++ 
b/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/lakehouse/database/jdbc.md
@@ -316,3 +316,32 @@ select * from query("catalog" = "jdbc_catalog", "query" = 
"select * from db_name
 - 只有对 Catalog 有 LOAD 权限的用户,才能执行`CALL EXECUTE_STMT()`命令。
 - 只有对 Catalog 有 SELECT 权限的用户,才能执行`query()`表函数。
 - `query` 表函数读取到的的数据,数据类型的支持与所查询的 catalog 类型支持的数据类型一致。
+
+## 连接池问题排查
+
+1. 在小于 2.0.5 的版本,连接池相关配置只能在 BE conf 的 JAVA_OPTS 中配置,参考 2.0.4 版本的 
[be.conf](https://github.com/apache/doris/blob/2.0.4-rc06/conf/be.conf#L22)。
+2. 在 2.0.5 及之后的版本,连接池相关配置可以在 Catalog 属性中配置,参考 [连接池属性](#连接池属性)。
+3. Doris 使用的连接池在 2.0.10(2.0 Release)和 2.1.3(2.1 Release)开始从 Druid 换为 
HikariCP,故连接池相关报错以及原因排查方式有所不同,参考如下
+
+* Druid 连接池版本
+    * Initialize datasource failed:  CAUSED BY: GetConnectionTimeoutException: 
wait millis 5006, active 10, maxActive 10, creating 1
+        * 原因 1:查询太多导致连接个数超出配置
+        * 原因 2:连接池计数异常导致活跃计数未下降
+        * 解决方法
+            * alter catalog <catalog_name> set properties 
('connection_pool_max_size' = '100'); 暂时通过调整连接数来增大连接池容量,且可以通过这种方式刷新连接池缓存
+            * 升级到更换连接池到 Hikari 版本
+        * Initialize datasource failed:  CAUSED BY: 
GetConnectionTimeoutException: wait millis 5006, active 10, maxActive 0, 
creating 1
+            * 原因 1:网络不通
+            * 原因 2:网络延迟高,导致创建连接超过 5s
+            * 解决方法
+                * 检查网络
+                * alter catalog <catalog_name> set properties 
('connection_pool_max_wait' = '10000'); 调大超时时间
+* HikariCP 连接池版本
+    * HikariPool-2 - Connection is not available, request timed out after 
5000ms
+        * 原因 1:网络不通
+        * 原因 2:网络延迟高,导致创建连接超过 5s
+        * 原因 3:查询太多导致连接个数超出配置
+        * 解决方法
+            * 检查网络
+            * alter catalog <catalog_name> set properties 
('connection_pool_max_size' = '100'); 调大连接个数
+            * alter catalog <catalog_name> set properties 
('connection_pool_max_wait_time' = '10000'); 调大超时时间
diff --git 
a/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/lakehouse/database/mysql.md
 
b/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/lakehouse/database/mysql.md
index 1576fb0ea41..0ea99868186 100644
--- 
a/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/lakehouse/database/mysql.md
+++ 
b/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/lakehouse/database/mysql.md
@@ -163,6 +163,41 @@ Doris 会在 Catalog 中维护表的统计信息,以便在执行查询时能
 
 Doris 会在下发到 MySQL 的查询语句中,自动在字段名与表名上加上转义符:(``),以避免字段名与表名与 MySQL 内部关键字冲突。
 
+## 连接异常排查
+
+* Communications link failure The last packet successfully received from the 
server was 7 milliseconds ago.
+    * 原因:
+        * 网络问题:
+            * 网络不稳定或连接中断。
+            * 客户端和服务器之间的网络延迟过高。
+        * MySQL 服务器设置
+            * MySQL 服务器可能配置了连接超时参数,例如 wait_timeout 或 
interactive_timeout,导致连接超时被关闭。
+        * 防火墙设置
+            * 防火墙规则可能阻止了客户端与服务器之间的通信。
+        * 连接池设置
+            * 连接池中的配置 connection_pool_max_life_time 可能导致连接被关闭或回收,或者未及时探活
+        * 服务器资源问题
+            * MySQL 服务器可能资源不足,无法处理新的连接请求。
+        * 客户端配置
+            * 客户端 JDBC 驱动配置错误,例如 autoReconnect 参数未设置或设置不当。
+    * 解决
+        * 检查网络连接:
+            * 确认客户端和服务器之间的网络连接稳定,避免网络延迟过高。
+        * 检查 MySQL 服务器配置:
+            * 查看并调整 MySQL 服务器的 wait_timeout 和 interactive_timeout 参数,确保它们设置合理。
+        * 检查防火墙配置:
+            * 确认防火墙规则允许客户端与服务器之间的通信。
+        * 调整连接池设置:
+            * 检查并调整连接池的配置参数 connection_pool_max_life_time,确保小于 MySQL 
的wait_timeout 和 interactive_timeout 参数并大于执行时间最长的 SQL
+        * 监控服务器资源:
+            *  监控 MySQL 服务器的资源使用情况,确保有足够的资源处理连接请求。
+        * 优化客户端配置:
+            * 确认 JDBC 驱动的配置参数正确,例如 autoReconnect=true,确保连接能在中断后自动重连。
+
+* java.io.EOFException MESSAGE: Can not read response from server. Expected to 
read 819 bytes, read 686 bytes before connection was unexpectedly lost.
+    * 原因:连接被 MySQL Kill 或者 MySQL 宕机
+    * 解决:检查 MySQL 是否有主动 kill 连接的机制,或者是否因为查询过大查崩 MySQL
+
 ## 常见问题
 
 1. 读写 MySQL 的 emoji 表情出现乱码
@@ -284,3 +319,14 @@ Doris 会在下发到 MySQL 的查询语句中,自动在字段名与表名上
     ```
 
 7. 查询 MySQL 的时候,出现长时间卡住没有返回结果,或着卡住很长时间并且 fe.warn.log 中出现出现大量 write lock 
日志,可以尝试在 URL 添加 socketTimeout 
,例如:`jdbc:mysql://host:port/database?socketTimeout=30000`,防止 JDBC 客户端 在被 MySQL 
关闭连接后无限等待。
+
+8. 在使用 MySQL Catalog 的过程中发现 FE 的 JVM 内存或 Threads 数持续增长不减少,并可能同时出现 Forward to 
master connection timed out 报错
+
+   打印 FE 线程堆栈 `jstack fe_pid > fe.js`,如果出现大量 
`mysql-cj-abandoned-connection-cleanup` 线程,说明是 MySQL JDBC 驱动的问题。
+
+   按照如下方式处理:
+
+   1. 升级 MySQL JDBC 驱动到 8.0.31 及以上版本
+   2. 在 FE 和 BE conf 文件的 JAVA_OPTS 中增加 
`-Dcom.mysql.cj.disableAbandonedConnectionCleanup=true` 参数,禁用 MySQL JDBC 
驱动的连接清理功能,并重启集群
+
+   **注意:** 如果 Doris 的版本在 2.0.13 及以上(2.0 Release),或 2.1.5 及以上(2.1 
Release)则无需增加该参数,因为 Doris 已经默认禁用了 MySQL JDBC 驱动的连接清理功能。只需更换 MySQL JDBC 
驱动版本即可。但是需要重启 Doris 集群来清理掉之前的 Threads。
diff --git 
a/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.0/lakehouse/database/jdbc.md
 
b/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.0/lakehouse/database/jdbc.md
index e39b8595f49..2a8e593d81d 100644
--- 
a/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.0/lakehouse/database/jdbc.md
+++ 
b/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.0/lakehouse/database/jdbc.md
@@ -316,3 +316,32 @@ select * from query("catalog" = "jdbc_catalog", "query" = 
"select * from db_name
 - 只有对 Catalog 有 LOAD 权限的用户,才能执行`CALL EXECUTE_STMT()`命令。
 - 只有对 Catalog 有 SELECT 权限的用户,才能执行`query()`表函数。
 - `query` 表函数读取到的的数据,数据类型的支持与所查询的 catalog 类型支持的数据类型一致。
+
+## 连接池问题排查
+
+1. 在小于 2.0.5 的版本,连接池相关配置只能在 BE conf 的 JAVA_OPTS 中配置,参考 2.0.4 版本的 
[be.conf](https://github.com/apache/doris/blob/2.0.4-rc06/conf/be.conf#L22)。
+2. 在 2.0.5 及之后的版本,连接池相关配置可以在 Catalog 属性中配置,参考 [连接池属性](#连接池属性)。
+3. Doris 使用的连接池在 2.0.10(2.0 Release)和 2.1.3(2.1 Release)开始从 Druid 换为 
HikariCP,故连接池相关报错以及原因排查方式有所不同,参考如下
+
+* Druid 连接池版本
+    * Initialize datasource failed:  CAUSED BY: GetConnectionTimeoutException: 
wait millis 5006, active 10, maxActive 10, creating 1
+        * 原因 1:查询太多导致连接个数超出配置
+        * 原因 2:连接池计数异常导致活跃计数未下降
+        * 解决方法
+            * alter catalog <catalog_name> set properties 
('connection_pool_max_size' = '100'); 暂时通过调整连接数来增大连接池容量,且可以通过这种方式刷新连接池缓存
+            * 升级到更换连接池到 Hikari 版本
+        * Initialize datasource failed:  CAUSED BY: 
GetConnectionTimeoutException: wait millis 5006, active 10, maxActive 0, 
creating 1
+            * 原因 1:网络不通
+            * 原因 2:网络延迟高,导致创建连接超过 5s
+            * 解决方法
+                * 检查网络
+                * alter catalog <catalog_name> set properties 
('connection_pool_max_wait' = '10000'); 调大超时时间
+* HikariCP 连接池版本
+    * HikariPool-2 - Connection is not available, request timed out after 
5000ms
+        * 原因 1:网络不通
+        * 原因 2:网络延迟高,导致创建连接超过 5s
+        * 原因 3:查询太多导致连接个数超出配置
+        * 解决方法
+            * 检查网络
+            * alter catalog <catalog_name> set properties 
('connection_pool_max_size' = '100'); 调大连接个数
+            * alter catalog <catalog_name> set properties 
('connection_pool_max_wait_time' = '10000'); 调大超时时间
diff --git 
a/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.0/lakehouse/database/mysql.md
 
b/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.0/lakehouse/database/mysql.md
index 1576fb0ea41..b8581a88014 100644
--- 
a/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.0/lakehouse/database/mysql.md
+++ 
b/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.0/lakehouse/database/mysql.md
@@ -163,6 +163,41 @@ Doris 会在 Catalog 中维护表的统计信息,以便在执行查询时能
 
 Doris 会在下发到 MySQL 的查询语句中,自动在字段名与表名上加上转义符:(``),以避免字段名与表名与 MySQL 内部关键字冲突。
 
+## 连接异常排查
+
+* Communications link failure The last packet successfully received from the 
server was 7 milliseconds ago.
+  * 原因:
+    * 网络问题:
+      * 网络不稳定或连接中断。
+      * 客户端和服务器之间的网络延迟过高。
+    * MySQL 服务器设置
+      * MySQL 服务器可能配置了连接超时参数,例如 wait_timeout 或 interactive_timeout,导致连接超时被关闭。
+    * 防火墙设置
+      * 防火墙规则可能阻止了客户端与服务器之间的通信。
+    * 连接池设置
+      * 连接池中的配置 connection_pool_max_life_time 可能导致连接被关闭或回收,或者未及时探活
+    * 服务器资源问题
+      * MySQL 服务器可能资源不足,无法处理新的连接请求。
+    * 客户端配置
+        * 客户端 JDBC 驱动配置错误,例如 autoReconnect 参数未设置或设置不当。
+  * 解决
+    * 检查网络连接:
+        * 确认客户端和服务器之间的网络连接稳定,避免网络延迟过高。
+    * 检查 MySQL 服务器配置:
+        * 查看并调整 MySQL 服务器的 wait_timeout 和 interactive_timeout 参数,确保它们设置合理。
+    * 检查防火墙配置:
+        * 确认防火墙规则允许客户端与服务器之间的通信。
+    * 调整连接池设置:
+        * 检查并调整连接池的配置参数 connection_pool_max_life_time,确保小于 MySQL 的wait_timeout 
和 interactive_timeout 参数并大于执行时间最长的 SQL
+    * 监控服务器资源:
+        *  监控 MySQL 服务器的资源使用情况,确保有足够的资源处理连接请求。
+    * 优化客户端配置:
+        * 确认 JDBC 驱动的配置参数正确,例如 autoReconnect=true,确保连接能在中断后自动重连。
+
+* java.io.EOFException MESSAGE: Can not read response from server. Expected to 
read 819 bytes, read 686 bytes before connection was unexpectedly lost.
+  * 原因:连接被 MySQL Kill 或者 MySQL 宕机
+  * 解决:检查 MySQL 是否有主动 kill 连接的机制,或者是否因为查询过大查崩 MySQL
+
 ## 常见问题
 
 1. 读写 MySQL 的 emoji 表情出现乱码
@@ -284,3 +319,14 @@ Doris 会在下发到 MySQL 的查询语句中,自动在字段名与表名上
     ```
 
 7. 查询 MySQL 的时候,出现长时间卡住没有返回结果,或着卡住很长时间并且 fe.warn.log 中出现出现大量 write lock 
日志,可以尝试在 URL 添加 socketTimeout 
,例如:`jdbc:mysql://host:port/database?socketTimeout=30000`,防止 JDBC 客户端 在被 MySQL 
关闭连接后无限等待。
+
+8. 在使用 MySQL Catalog 的过程中发现 FE 的 JVM 内存或 Threads 数持续增长不减少,并可能同时出现 Forward to 
master connection timed out 报错
+
+   打印 FE 线程堆栈 `jstack fe_pid > fe.js`,如果出现大量 
`mysql-cj-abandoned-connection-cleanup` 线程,说明是 MySQL JDBC 驱动的问题。
+
+   按照如下方式处理:
+
+   1. 升级 MySQL JDBC 驱动到 8.0.31 及以上版本
+   2. 在 FE 和 BE conf 文件的 JAVA_OPTS 中增加 
`-Dcom.mysql.cj.disableAbandonedConnectionCleanup=true` 参数,禁用 MySQL JDBC 
驱动的连接清理功能,并重启集群
+
+   **注意:** 如果 Doris 的版本在 2.0.13 及以上(2.0 Release),或 2.1.5 及以上(2.1 
Release)则无需增加该参数,因为 Doris 已经默认禁用了 MySQL JDBC 驱动的连接清理功能。只需更换 MySQL JDBC 
驱动版本即可。但是需要重启 Doris 集群来清理掉之前的 Threads。
diff --git a/versioned_docs/version-2.0/lakehouse/database/jdbc.md 
b/versioned_docs/version-2.0/lakehouse/database/jdbc.md
index eaa24ac4bca..640e95938c5 100644
--- a/versioned_docs/version-2.0/lakehouse/database/jdbc.md
+++ b/versioned_docs/version-2.0/lakehouse/database/jdbc.md
@@ -265,3 +265,32 @@ Through the `CALL EXECUTE_STMT()` command, Doris will 
directly send the SQL stat
 - Only users with LOAD permissions on the Catalog can execute the `CALL 
EXECUTE_STMT()` command.
 - Only users with SELECT permissions on Catalog can execute the `query()` 
table function.
 - The supported data types of the data read by the `query` table function are 
consistent with the data types supported by the queried catalog type.
+
+## Troubleshooting connection pool issues
+
+1. In versions less than 2.0.5, the connection pool related configuration can 
only be configured in JAVA_OPTS of BE conf, refer to version 2.0.4 
[be.conf](https://github.com/apache/doris/blob/ 2.0.4-rc06/conf/be.conf#L22).
+2. In versions 2.0.5 and later, connection pool related configurations can be 
configured in the Catalog properties, refer to [Connection Pool 
Properties](#Connection Pool Properties).
+3. The connection pool used by Doris was changed from Druid to HikariCP 
starting from 2.0.10 (2.0 Release) and 2.1.3 (2.1 Release), so the connection 
pool related errors and troubleshooting methods are different, refer to the 
following
+
+* Druid connection pool version
+   * Initialize datasource failed: CAUSED BY: GetConnectionTimeoutException: 
wait millis 5006, active 10, maxActive 10, creating 1
+      * Reason 1: Too many queries cause the number of connections to exceed 
the configuration
+      * Reason 2: The connection pool count is abnormal and the active count 
does not decrease.
+      * Solution
+         * alter catalog <catalog_name> set properties 
('connection_pool_max_size' = '100'); Temporarily increase the connection pool 
capacity by adjusting the number of connections, and the connection pool cache 
can be refreshed in this way
+         * Upgrade to replace the connection pool to Hikari version
+      * Initialize datasource failed: CAUSED BY: 
GetConnectionTimeoutException: wait millis 5006, active 10, maxActive 0, 
creating 1
+         * Reason 1: Network failure
+         * Reason 2: The network latency is high, causing the connection 
creation to take more than 5s
+         * Solution
+            * Check network
+            * alter catalog <catalog_name> set properties 
('connection_pool_max_wait' = '10000'); Increase the timeout
+* HikariCP connection pool version
+   * HikariPool-2 - Connection is not available, request timed out after 5000ms
+      * Reason 1: Network failure
+      * Reason 2: The network delay is high, causing the connection creation 
to take more than 5s
+      * Reason 3: Too many queries cause the number of connections to exceed 
the configuration
+      * Solution
+         * Check network
+         * alter catalog <catalog_name> set properties 
('connection_pool_max_size' = '100'); Increase the number of connections
+         * alter catalog <catalog_name> set properties 
('connection_pool_max_wait_time' = '10000'); Increase the timeout
diff --git a/versioned_docs/version-2.0/lakehouse/database/mysql.md 
b/versioned_docs/version-2.0/lakehouse/database/mysql.md
index b32ead3ae9b..f22af1903b0 100644
--- a/versioned_docs/version-2.0/lakehouse/database/mysql.md
+++ b/versioned_docs/version-2.0/lakehouse/database/mysql.md
@@ -161,6 +161,41 @@ If you have the limit keyword in the query, Doris will 
push the limit down to My
 
 Doris will automatically add the escape character (``) to the field names and 
table names in the query statements sent to MySQL to avoid conflicts between 
field names, table names and MySQL internal keywords.
 
+## Troubleshoot connection exceptions
+
+* Communications link failure The last packet successfully received from the 
server was 7 milliseconds ago.
+   * reason:
+      * Internet problem:
+         * The network is unstable or the connection is interrupted.
+         * Network latency between client and server is too high.
+      * MySQL server settings
+         * The MySQL server may be configured with connection timeout 
parameters, such as wait_timeout or interactive_timeout, causing the connection 
to timeout and be closed.
+      * Firewall settings
+         * Firewall rules may be blocking communication between the client and 
the server.
+      * Connection pool settings
+         * The configuration connection_pool_max_life_time in the connection 
pool may cause the connection to be closed or recycled, or the connection may 
not be detected in time.
+      * Server resource issues
+         * The MySQL server may have insufficient resources to handle new 
connection requests.
+      * Client configuration
+         * Client JDBC driver configuration error, for example, the 
autoReconnect parameter is not set or set improperly.
+   * solve
+      * Check network connection:
+         * Confirm that the network connection between the client and the 
server is stable to avoid excessive network latency.
+      * Check MySQL server configuration:
+         * Review and adjust the MySQL server's wait_timeout and 
interactive_timeout parameters to ensure they are set appropriately.
+      * Check firewall configuration:
+         * Verify that firewall rules allow communication between client and 
server.
+      * Adjust connection pool settings:
+         * Check and adjust the connection pool configuration parameter 
connection_pool_max_life_time to ensure it is smaller than MySQL's wait_timeout 
and interactive_timeout parameters and larger than the SQL with the longest 
execution time
+      * Monitor server resources:
+         * Monitor the resource usage of the MySQL server to ensure that there 
are sufficient resources to handle connection requests.
+      * Optimize client configuration:
+         * Confirm that the configuration parameters of the JDBC driver are 
correct, such as autoReconnect=true, to ensure that the connection can 
automatically reconnect after being interrupted.
+
+* java.io.EOFException MESSAGE: Can not read response from server. Expected to 
read 819 bytes, read 686 bytes before connection was unexpectedly lost.
+   * Reason: The connection was killed by MySQL or MySQL crashed
+   * Solution: Check whether MySQL has a mechanism to actively kill 
connections, or whether MySQL crashes because of too large a query.
+
 ## FAQ
 
 1. The emoji expressions read and written in MySQL are garbled.
@@ -282,3 +317,14 @@ Doris will automatically add the escape character (``) to 
the field names and ta
     ```
 
 7. When querying MySQL, if you are stuck for a long time and no results are 
returned, or if you are stuck for a long time and a large number of write lock 
logs appear in fe.warn.log, you can try adding socketTimeout to the URL, for 
example: `jdbc:mysql ://host:port/database?socketTimeout=30000`, prevents the 
JDBC client from waiting indefinitely after the connection is closed by MySQL.
+
+8. In the process of using MySQL Catalog, it is found that the JVM memory or 
the number of Threads in FE continues to grow and does not decrease, and a 
Forward to master connection timed out error may appear at the same time.
+
+   Print the FE thread stack `jstack fe_pid > fe.js`. If a large number of 
`mysql-cj-abandoned-connection-cleanup` threads appear, it means there is a 
problem with the MySQL JDBC driver.
+
+   Proceed as follows:
+
+   1. Upgrade the MySQL JDBC driver to version 8.0.31 and above
+   2. Add the `-Dcom.mysql.cj.disableAbandonedConnectionCleanup=true` 
parameter to JAVA_OPTS in the FE and BE conf files, disable the connection 
cleanup function of the MySQL JDBC driver, and restart the cluster
+
+   **Note:** If the version of Doris is 2.0.13 and above (2.0 Release), or 
2.1.5 and above (2.1 Release), there is no need to increase this parameter, 
because Doris has disabled the connection cleaning function of the MySQL JDBC 
driver by default. . Just change the MySQL JDBC driver version. However, the 
Doris cluster needs to be restarted to clean up the previous Threads.
diff --git a/versioned_docs/version-2.1/lakehouse/database/jdbc.md 
b/versioned_docs/version-2.1/lakehouse/database/jdbc.md
index 6adf0d1758c..803a468bf57 100644
--- a/versioned_docs/version-2.1/lakehouse/database/jdbc.md
+++ b/versioned_docs/version-2.1/lakehouse/database/jdbc.md
@@ -316,3 +316,32 @@ Through the `CALL EXECUTE_STMT()` command, Doris will 
directly send the SQL stat
 - Only users with LOAD permissions on the Catalog can execute the `CALL 
EXECUTE_STMT()` command.
 - Only users with SELECT permissions on Catalog can execute the `query()` 
table function.
 - The supported data types of the data read by the `query` table function are 
consistent with the data types supported by the queried catalog type.
+
+## Troubleshooting connection pool issues
+
+1. In versions less than 2.0.5, the connection pool related configuration can 
only be configured in JAVA_OPTS of BE conf, refer to version 2.0.4 
[be.conf](https://github.com/apache/doris/blob/ 2.0.4-rc06/conf/be.conf#L22).
+2. In versions 2.0.5 and later, connection pool related configurations can be 
configured in the Catalog properties, refer to [Connection Pool 
Properties](#Connection Pool Properties).
+3. The connection pool used by Doris was changed from Druid to HikariCP 
starting from 2.0.10 (2.0 Release) and 2.1.3 (2.1 Release), so the connection 
pool related errors and troubleshooting methods are different, refer to the 
following
+
+* Druid connection pool version
+    * Initialize datasource failed: CAUSED BY: GetConnectionTimeoutException: 
wait millis 5006, active 10, maxActive 10, creating 1
+        * Reason 1: Too many queries cause the number of connections to exceed 
the configuration
+        * Reason 2: The connection pool count is abnormal and the active count 
does not decrease.
+        * Solution
+            * alter catalog <catalog_name> set properties 
('connection_pool_max_size' = '100'); Temporarily increase the connection pool 
capacity by adjusting the number of connections, and the connection pool cache 
can be refreshed in this way
+            * Upgrade to replace the connection pool to Hikari version
+        * Initialize datasource failed: CAUSED BY: 
GetConnectionTimeoutException: wait millis 5006, active 10, maxActive 0, 
creating 1
+            * Reason 1: Network failure
+            * Reason 2: The network latency is high, causing the connection 
creation to take more than 5s
+            * Solution
+                * Check network
+                * alter catalog <catalog_name> set properties 
('connection_pool_max_wait' = '10000'); Increase the timeout
+* HikariCP connection pool version
+    * HikariPool-2 - Connection is not available, request timed out after 
5000ms
+        * Reason 1: Network failure
+        * Reason 2: The network delay is high, causing the connection creation 
to take more than 5s
+        * Reason 3: Too many queries cause the number of connections to exceed 
the configuration
+        * Solution
+            * Check network
+            * alter catalog <catalog_name> set properties 
('connection_pool_max_size' = '100'); Increase the number of connections
+            * alter catalog <catalog_name> set properties 
('connection_pool_max_wait_time' = '10000'); Increase the timeout
diff --git a/versioned_docs/version-2.1/lakehouse/database/mysql.md 
b/versioned_docs/version-2.1/lakehouse/database/mysql.md
index bbcb3a13492..df42aae0fc7 100644
--- a/versioned_docs/version-2.1/lakehouse/database/mysql.md
+++ b/versioned_docs/version-2.1/lakehouse/database/mysql.md
@@ -164,6 +164,41 @@ If you have the limit keyword in the query, Doris will 
push the limit down to My
 
 Doris will automatically add the escape character (``) to the field names and 
table names in the query statements sent to MySQL to avoid conflicts between 
field names, table names and MySQL internal keywords.
 
+## Troubleshoot connection exceptions
+
+* Communications link failure The last packet successfully received from the 
server was 7 milliseconds ago.
+   * reason:
+      * Internet problem:
+         * The network is unstable or the connection is interrupted.
+         * Network latency between client and server is too high.
+      * MySQL server settings
+         * The MySQL server may be configured with connection timeout 
parameters, such as wait_timeout or interactive_timeout, causing the connection 
to timeout and be closed.
+      * Firewall settings
+         * Firewall rules may be blocking communication between the client and 
the server.
+      * Connection pool settings
+         * The configuration connection_pool_max_life_time in the connection 
pool may cause the connection to be closed or recycled, or the connection may 
not be detected in time.
+      * Server resource issues
+         * The MySQL server may have insufficient resources to handle new 
connection requests.
+      * Client configuration
+         * Client JDBC driver configuration error, for example, the 
autoReconnect parameter is not set or set improperly.
+   * solve
+      * Check network connection:
+         * Confirm that the network connection between the client and the 
server is stable to avoid excessive network latency.
+      * Check MySQL server configuration:
+         * Review and adjust the MySQL server's wait_timeout and 
interactive_timeout parameters to ensure they are set appropriately.
+      * Check firewall configuration:
+         * Verify that firewall rules allow communication between client and 
server.
+      * Adjust connection pool settings:
+         * Check and adjust the connection pool configuration parameter 
connection_pool_max_life_time to ensure it is smaller than MySQL's wait_timeout 
and interactive_timeout parameters and larger than the SQL with the longest 
execution time
+      * Monitor server resources:
+         * Monitor the resource usage of the MySQL server to ensure that there 
are sufficient resources to handle connection requests.
+      * Optimize client configuration:
+         * Confirm that the configuration parameters of the JDBC driver are 
correct, such as autoReconnect=true, to ensure that the connection can 
automatically reconnect after being interrupted.
+
+* java.io.EOFException MESSAGE: Can not read response from server. Expected to 
read 819 bytes, read 686 bytes before connection was unexpectedly lost.
+   * Reason: The connection was killed by MySQL or MySQL crashed
+   * Solution: Check whether MySQL has a mechanism to actively kill 
connections, or whether MySQL crashes because of too large a query.
+
 ## FAQ
 
 1. The emoji expressions read and written in MySQL are garbled.
@@ -285,3 +320,14 @@ Doris will automatically add the escape character (``) to 
the field names and ta
     ```
 
 7. When querying MySQL, if you are stuck for a long time and no results are 
returned, or if you are stuck for a long time and a large number of write lock 
logs appear in fe.warn.log, you can try adding socketTimeout to the URL, for 
example: `jdbc:mysql ://host:port/database?socketTimeout=30000`, prevents the 
JDBC client from waiting indefinitely after the connection is closed by MySQL.
+
+8. In the process of using MySQL Catalog, it is found that the JVM memory or 
the number of Threads in FE continues to grow and does not decrease, and a 
Forward to master connection timed out error may appear at the same time.
+
+   Print the FE thread stack `jstack fe_pid > fe.js`. If a large number of 
`mysql-cj-abandoned-connection-cleanup` threads appear, it means there is a 
problem with the MySQL JDBC driver.
+
+   Proceed as follows:
+
+   1. Upgrade the MySQL JDBC driver to version 8.0.31 and above
+   2. Add the `-Dcom.mysql.cj.disableAbandonedConnectionCleanup=true` 
parameter to JAVA_OPTS in the FE and BE conf files, disable the connection 
cleanup function of the MySQL JDBC driver, and restart the cluster
+
+   **Note:** If the version of Doris is 2.0.13 and above (2.0 Release), or 
2.1.5 and above (2.1 Release), there is no need to increase this parameter, 
because Doris has disabled the connection cleaning function of the MySQL JDBC 
driver by default. . Just change the MySQL JDBC driver version. However, the 
Doris cluster needs to be restarted to clean up the previous Threads.
diff --git a/versioned_docs/version-3.0/lakehouse/database/jdbc.md 
b/versioned_docs/version-3.0/lakehouse/database/jdbc.md
index 6adf0d1758c..803a468bf57 100644
--- a/versioned_docs/version-3.0/lakehouse/database/jdbc.md
+++ b/versioned_docs/version-3.0/lakehouse/database/jdbc.md
@@ -316,3 +316,32 @@ Through the `CALL EXECUTE_STMT()` command, Doris will 
directly send the SQL stat
 - Only users with LOAD permissions on the Catalog can execute the `CALL 
EXECUTE_STMT()` command.
 - Only users with SELECT permissions on Catalog can execute the `query()` 
table function.
 - The supported data types of the data read by the `query` table function are 
consistent with the data types supported by the queried catalog type.
+
+## Troubleshooting connection pool issues
+
+1. In versions less than 2.0.5, the connection pool related configuration can 
only be configured in JAVA_OPTS of BE conf, refer to version 2.0.4 
[be.conf](https://github.com/apache/doris/blob/ 2.0.4-rc06/conf/be.conf#L22).
+2. In versions 2.0.5 and later, connection pool related configurations can be 
configured in the Catalog properties, refer to [Connection Pool 
Properties](#Connection Pool Properties).
+3. The connection pool used by Doris was changed from Druid to HikariCP 
starting from 2.0.10 (2.0 Release) and 2.1.3 (2.1 Release), so the connection 
pool related errors and troubleshooting methods are different, refer to the 
following
+
+* Druid connection pool version
+    * Initialize datasource failed: CAUSED BY: GetConnectionTimeoutException: 
wait millis 5006, active 10, maxActive 10, creating 1
+        * Reason 1: Too many queries cause the number of connections to exceed 
the configuration
+        * Reason 2: The connection pool count is abnormal and the active count 
does not decrease.
+        * Solution
+            * alter catalog <catalog_name> set properties 
('connection_pool_max_size' = '100'); Temporarily increase the connection pool 
capacity by adjusting the number of connections, and the connection pool cache 
can be refreshed in this way
+            * Upgrade to replace the connection pool to Hikari version
+        * Initialize datasource failed: CAUSED BY: 
GetConnectionTimeoutException: wait millis 5006, active 10, maxActive 0, 
creating 1
+            * Reason 1: Network failure
+            * Reason 2: The network latency is high, causing the connection 
creation to take more than 5s
+            * Solution
+                * Check network
+                * alter catalog <catalog_name> set properties 
('connection_pool_max_wait' = '10000'); Increase the timeout
+* HikariCP connection pool version
+    * HikariPool-2 - Connection is not available, request timed out after 
5000ms
+        * Reason 1: Network failure
+        * Reason 2: The network delay is high, causing the connection creation 
to take more than 5s
+        * Reason 3: Too many queries cause the number of connections to exceed 
the configuration
+        * Solution
+            * Check network
+            * alter catalog <catalog_name> set properties 
('connection_pool_max_size' = '100'); Increase the number of connections
+            * alter catalog <catalog_name> set properties 
('connection_pool_max_wait_time' = '10000'); Increase the timeout
diff --git a/versioned_docs/version-3.0/lakehouse/database/mysql.md 
b/versioned_docs/version-3.0/lakehouse/database/mysql.md
index bbcb3a13492..df42aae0fc7 100644
--- a/versioned_docs/version-3.0/lakehouse/database/mysql.md
+++ b/versioned_docs/version-3.0/lakehouse/database/mysql.md
@@ -164,6 +164,41 @@ If you have the limit keyword in the query, Doris will 
push the limit down to My
 
 Doris will automatically add the escape character (``) to the field names and 
table names in the query statements sent to MySQL to avoid conflicts between 
field names, table names and MySQL internal keywords.
 
+## Troubleshoot connection exceptions
+
+* Communications link failure The last packet successfully received from the 
server was 7 milliseconds ago.
+   * reason:
+      * Internet problem:
+         * The network is unstable or the connection is interrupted.
+         * Network latency between client and server is too high.
+      * MySQL server settings
+         * The MySQL server may be configured with connection timeout 
parameters, such as wait_timeout or interactive_timeout, causing the connection 
to timeout and be closed.
+      * Firewall settings
+         * Firewall rules may be blocking communication between the client and 
the server.
+      * Connection pool settings
+         * The configuration connection_pool_max_life_time in the connection 
pool may cause the connection to be closed or recycled, or the connection may 
not be detected in time.
+      * Server resource issues
+         * The MySQL server may have insufficient resources to handle new 
connection requests.
+      * Client configuration
+         * Client JDBC driver configuration error, for example, the 
autoReconnect parameter is not set or set improperly.
+   * solve
+      * Check network connection:
+         * Confirm that the network connection between the client and the 
server is stable to avoid excessive network latency.
+      * Check MySQL server configuration:
+         * Review and adjust the MySQL server's wait_timeout and 
interactive_timeout parameters to ensure they are set appropriately.
+      * Check firewall configuration:
+         * Verify that firewall rules allow communication between client and 
server.
+      * Adjust connection pool settings:
+         * Check and adjust the connection pool configuration parameter 
connection_pool_max_life_time to ensure it is smaller than MySQL's wait_timeout 
and interactive_timeout parameters and larger than the SQL with the longest 
execution time
+      * Monitor server resources:
+         * Monitor the resource usage of the MySQL server to ensure that there 
are sufficient resources to handle connection requests.
+      * Optimize client configuration:
+         * Confirm that the configuration parameters of the JDBC driver are 
correct, such as autoReconnect=true, to ensure that the connection can 
automatically reconnect after being interrupted.
+
+* java.io.EOFException MESSAGE: Can not read response from server. Expected to 
read 819 bytes, read 686 bytes before connection was unexpectedly lost.
+   * Reason: The connection was killed by MySQL or MySQL crashed
+   * Solution: Check whether MySQL has a mechanism to actively kill 
connections, or whether MySQL crashes because of too large a query.
+
 ## FAQ
 
 1. The emoji expressions read and written in MySQL are garbled.
@@ -285,3 +320,14 @@ Doris will automatically add the escape character (``) to 
the field names and ta
     ```
 
 7. When querying MySQL, if you are stuck for a long time and no results are 
returned, or if you are stuck for a long time and a large number of write lock 
logs appear in fe.warn.log, you can try adding socketTimeout to the URL, for 
example: `jdbc:mysql ://host:port/database?socketTimeout=30000`, prevents the 
JDBC client from waiting indefinitely after the connection is closed by MySQL.
+
+8. In the process of using MySQL Catalog, it is found that the JVM memory or 
the number of Threads in FE continues to grow and does not decrease, and a 
Forward to master connection timed out error may appear at the same time.
+
+   Print the FE thread stack `jstack fe_pid > fe.js`. If a large number of 
`mysql-cj-abandoned-connection-cleanup` threads appear, it means there is a 
problem with the MySQL JDBC driver.
+
+   Proceed as follows:
+
+   1. Upgrade the MySQL JDBC driver to version 8.0.31 and above
+   2. Add the `-Dcom.mysql.cj.disableAbandonedConnectionCleanup=true` 
parameter to JAVA_OPTS in the FE and BE conf files, disable the connection 
cleanup function of the MySQL JDBC driver, and restart the cluster
+
+   **Note:** If the version of Doris is 2.0.13 and above (2.0 Release), or 
2.1.5 and above (2.1 Release), there is no need to increase this parameter, 
because Doris has disabled the connection cleaning function of the MySQL JDBC 
driver by default. . Just change the MySQL JDBC driver version. However, the 
Doris cluster needs to be restarted to clean up the previous Threads.


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

Reply via email to