insert into lhl1 select * from lhl; 批量插入数据 连接中断

为提高效率,请提供以下信息,问题描述清晰能够更快得到解决:

【TiDB 版本】
v4.0.11
【问题描述】
insert into lhl1 select * from lhl; 批量插入数据 连接中断
报错:[Err] 2003 - Can’t connect to MySQL server on ‘192.168.150.202’ (10038)
lhl表中有2000万条记录


若提问为性能优化、故障排查类问题,请下载脚本运行。终端输出的打印结果,请务必全选并复制粘贴上传。

出现这个报错建议先自行检查下集群环境中 TiDB Server 的 log ,看下 TiDB Server 是否因为异常重启过 ~

[2021/04/06 18:34:25.805 +08:00] [INFO] [gc_worker.go:977] ["[gc worker] finish resolve locks"] [uuid=5e29af2a6cc0013] [safePoint=424071571862716416] [regions=35]
[2021/04/06 18:34:43.900 +08:00] [WARN] [expensivequery.go:178] [expensive_query] [cost_time=60.036473805s] [cop_time=0.651142914s] [process_time=8.734s] [wait_time=0.024s
] [request_count=9] [total_keys=8456589] [process_keys=8456580] [num_cop_tasks=9] [process_avg_time=0.970444444s] [process_p90_time=1.505s] [process_max_time=1.505s] [proc
ess_max_addr=192.168.150.203:20160] [wait_avg_time=0.002666666s] [wait_p90_time=0.009s] [wait_max_time=0.009s] [wait_max_addr=192.168.150.203:20160] [stats=lhl:42407162979
6540421] [conn_id=6] [user=root] [database=lhl] [table_ids="[48]"] [txn_start_ts=424071718191235081] [mem_max=“387380281 Bytes (369.4 MB)”] [sql=“insert into lhl1 select *
from lhl”]
[2021/04/06 18:35:11.701 +08:00] [WARN] [memory_usage_alarm.go:141] [“tidb-server has the risk of OOM. Running SQLs and heap profile will be recorded in record path”] [“is
server-memory-quota set”=false] [“system memory total”=8181821440] [“system memory usage”=6680588288] [“tidb-server memory usage”=4255793288] [memory-usage-alarm-ratio=0.
8] [“record path”="/tmp/1000_tidb/MC4wLjAuMDo0MDAwLzAuMC4wLjA6MTAwODA=/tmp-storage/record"]
[2021/04/06 18:35:25.541 +08:00] [INFO] [gc_worker.go:237] ["[gc worker] there’s already a gc job running, skipped"] [“leaderTick on”=5e29af2a6cc0013]
[2021/04/06 18:35:54.575 +08:00] [INFO] [printer.go:33] [“Welcome to TiDB.”] [“Release Version”=v4.0.11] [Edition=Community] [“Git Commit Hash”=058e52ad7c1b477147dcb933b3f
1b3b2be31e998] [“Git Branch”=heads/refs/tags/v4.0.11] [“UTC Build Time”=“2021-02-25 04:33:58”] [GoVersion=go1.13] [“Race Enabled”=false] [“Check Table Before Drop”=false]
[“TiKV Min Version”=v3.0.0-60965b006877ca7234adaced7890d7b029ed1306]
[2021/04/06 18:35:54.577 +08:00] [INFO] [printer.go:47] [“loaded config”] [config="{“host”:“0.0.0.0”,“advertise-address”:“192.168.150.201”,“port”:4000,“cors”:
“”,“store”:“tikv”,“path”:“192.168.150.201:2379”,“socket”:"",“lease”:“45s”,“run-ddl”:true,“split-table”:true,“token-limit”:1000,“oom-use-tmp-storage
“:true,“tmp-storage-path”:”/tmp/1000_tidb/MC4wLjAuMDo0MDAwLzAuMC4wLjA6MTAwODA=/tmp-storage”,“oom-action”:“log”,“mem-quota-query”:1073741824,“tmp-storage-quota
“:-1,“enable-streaming”:false,“enable-batch-dml”:false,“lower-case-table-names”:2,“server-version”:””,“log”:{“level”:“info”,“format”:“text”,“disable-t
imestamp”:null,“enable-timestamp”:null,“disable-error-stack”:null,“enable-error-stack”:null,“file”:{“filename”:"/tidb/deploy/tidb-4000/log/tidb.log",“max-siz
e”:300,“max-days”:0,“max-backups”:0},“enable-slow-log”:true,“slow-query-file”:“log/tidb_slow_query.log”,“slow-threshold”:300,“expensive-threshold”:10000,“q
uery-log-max-len”:4096,“record-plan-in-slow-log”:1},“security”:{“skip-grant-table”:false,“ssl-ca”:"",“ssl-cert”:"",“ssl-key”:"",“require-secure-transpo
rt”:false,“cluster-ssl-ca”:"",“cluster-ssl-cert”:"",“cluster-ssl-key”:"",“cluster-verify-cn”:null},“status”:{“status-host”:“0.0.0.0”,“metrics-addr”:
“”,“status-port”:10080,“metrics-interval”:15,“report-status”:true,“record-db-qps”:false},“performance”:{“max-procs”:0,“max-memory”:0,“server-memory-quota
“:0,“memory-usage-alarm-ratio”:0.8,“stats-lease”:“3s”,“stmt-count-limit”:5000,“feedback-probability”:0,“query-feedback-limit”:512,“pseudo-estimate-ratio”:0.8
,“force-priority”:“NO_PRIORITY”,“bind-info-lease”:“3s”,“txn-entry-size-limit”:6291456,“txn-total-size-limit”:2173741824,“tcp-keep-alive”:true,“cross-join”:
true,“run-auto-analyze”:true,“agg-push-down-join”:false,“committer-concurrency”:16,“max-txn-ttl”:600000,“gogc”:100},“prepared-plan-cache”:{“enabled”:false,”
capacity”:100,“memory-guard-ratio”:0.1},“opentracing”:{“enable”:false,“rpc-metrics”:false,“sampler”:{“type”:“const”,“param”:1,“sampling-server-url”:""
,“max-operations”:0,“sampling-refresh-interval”:0},“reporter”:{“queue-size”:0,“buffer-flush-interval”:0,“log-spans”:false,“local-agent-host-port”:""}},“pr
oxy-protocol”:{“networks”:"",“header-timeout”:5},“tikv-client”:{“grpc-connection-count”:4,“grpc-keepalive-time”:10,“grpc-keepalive-timeout”:3,“commit-timeo
ut”:“41s”,“max-batch-size”:128,“overload-threshold”:200,“max-batch-wait-time”:0,“batch-wait-size”:8,“enable-chunk-rpc”:true,“region-cache-ttl”:600,“store-l
imit”:0,“store-liveness-timeout”:“5s”,“copr-cache”:{“enable”:false,“capacity-mb”:1000,“admission-max-ranges”:500,“admission-max-result-mb”:10,“admission-mi
n-process-ms”:5}},“binlog”:{“enable”:false,“ignore-error”:false,“write-timeout”:“15s”,“binlog-socket”:"",“strategy”:“range”},“compatible-kill-query”:f
alse,“plugin”:{“dir”:"",“load”:""},“pessimistic-txn”:{“enable”:true,“max-retry-count”:256},“check-mb4-value-in-utf8”:true,“max-index-length”:3072,“gra
ceful-wait-before-shutdown”:0,“alter-primary-key”:false,“treat-old-version-utf8-as-utf8mb4”:true,“enable-table-lock”:false,“delay-clean-table-lock”:0,“split-regi
on-max-num”:1000,“stmt-summary”:{“enable”:true,“enable-internal-query”:false,“max-stmt-count”:200,“max-sql-length”:4096,“refresh-interval”:1800,“history-size
“:24},“repair-mode”:false,“repair-table-list”:[],“isolation-read”:{“engines”:[“tikv”,“tiflash”,“tidb”]},“max-server-connections”:0,“new_collations_enable
d_on_first_bootstrap”:false,“experimental”:{“allow-expression-index”:false},“enable-collect-execution-info”:true,“skip-register-to-dashboard”:false,“enable-telem
etry”:true}”]
[2021/04/06 18:35:54.577 +08:00] [INFO] [main.go:304] [“disable Prometheus push client”]
[2021/04/06 18:35:54.577 +08:00] [INFO] [store.go:68] [“new store”] [path=tikv://192.168.150.201:2379]
[2021/04/06 18:35:54.577 +08:00] [INFO] [client.go:167] [”[pd] create pd client with endpoints"] [pd-address="[192.168.150.201:2379]"]
[2021/04/06 18:35:54.577 +08:00] [INFO] [systime_mon.go:25] [“start system time monitor”]
[2021/04/06 18:35:54.578 +08:00] [INFO] [base_client.go:252] ["[pd] switch leader"] [new-leader=http://192.168.150.201:2379] [old-leader=]
[2021/04/06 18:35:54.579 +08:00] [INFO] [base_client.go:102] ["[pd] init cluster id"] [cluster-id=6947983382890399858]
[2021/04/06 18:35:54.579 +08:00] [INFO] [store.go:74] [“new store with retry success”]
[2021/04/06 18:35:54.582 +08:00] [INFO] [tidb.go:72] [“new domain”] [store=tikv-6947983382890399858] [“ddl lease”=45s] [“stats lease”=3s]
[2021/04/06 18:35:54.586 +08:00] [INFO] [ddl.go:323] ["[ddl] start DDL"] [ID=9905af03-53e5-4715-ada6-1050d42a008f] [runWorker=true]
[2021/04/06 18:35:54.586 +08:00] [INFO] [manager.go:188] [“start campaign owner”] [ownerInfo="[ddl] /tidb/ddl/fg/owner"]
[2021/04/06 18:35:54.587 +08:00] [INFO] [ddl.go:312] ["[ddl] start delRangeManager OK"] [“is a emulator”=false]
[2021/04/06 18:35:54.588 +08:00] [INFO] [ddl_worker.go:131] ["[ddl] start DDL worker"] [worker=“worker 2, tp add index”]
[2021/04/06 18:35:54.588 +08:00] [INFO] [ddl_worker.go:131] ["[ddl] start DDL worker"] [worker=“worker 1, tp general”]
[2021/04/06 18:35:54.602 +08:00] [INFO] [domain.go:148] [“full load InfoSchema success”] [usedSchemaVersion=0] [neededSchemaVersion=28] [“start time”=9.440965ms]
[2021/04/06 18:35:54.603 +08:00] [INFO] [domain.go:379] [“full load and reset schema validator”]
[2021/04/06 18:35:54.613 +08:00] [INFO] [manager.go:188] [“start campaign owner”] [ownerInfo="[bindinfo] /tidb/bindinfo/owner"]
[2021/04/06 18:35:54.625 +08:00] [INFO] [manager.go:188] [“start campaign owner”] [ownerInfo="[stats] /tidb/stats/owner"]
[2021/04/06 18:35:54.625 +08:00] [INFO] [manager.go:188] [“start campaign owner”] [ownerInfo="[telemetry] /tidb/telemetry/owner"]
[2021/04/06 18:35:54.626 +08:00] [INFO] [gc_worker.go:167] ["[gc worker] start"] [uuid=5e29b0315c4000e]
[2021/04/06 18:35:54.631 +08:00] [INFO] [server.go:243] [“server is running MySQL protocol”] [addr=0.0.0.0:4000]
[2021/04/06 18:35:54.631 +08:00] [INFO] [http_status.go:83] [“for status and metrics report”] [“listening on addr”=0.0.0.0:10080]
[2021/04/06 18:35:54.633 +08:00] [INFO] [domain.go:1096] [“init stats info time”] [“take time”=7.777536ms]
[2021/04/06 18:36:17.328 +08:00] [WARN] [session.go:1184] [“parse SQL failed”] [conn=2] [error=“line 1 column 29 near “%mem_max%’” “] [SQL=“show config where name like %
mem_max%’”]
[2021/04/06 18:36:17.328 +08:00] [INFO] [conn.go:797] [“command dispatched failed”] [conn=2] [connInfo=“id:2, addr:192.168.150.1:57496 status:10, collation:utf8_general_ci
, user:root”] [command=Query] [status=“inTxn:0, autocommit:1”] [sql=“show config where name like %mem_max%’”] [txn_mode=PESSIMISTIC] [err=”[parser:1064]You have an error i
n your SQL syntax; check the manual that corresponds to your TiDB version for the right syntax to use line 1 column 29 near “%mem_max%’” “]
[2021/04/06 18:36:26.586 +08:00] [INFO] [manager.go:325] [“get owner”] [“owner info”=”[ddl] /tidb/ddl/fg/owner ownerManager 9905af03-53e5-4715-ada6-1050d42a008f”] [ownerID
=9905af03-53e5-4715-ada6-1050d42a008f]
[2021/04/06 18:36:27.086 +08:00] [INFO] [manager.go:325] [“get owner”] [“owner info”="[telemetry] /tidb/telemetry/owner ownerManager 9905af03-53e5-4715-ada6-1050d42a008f"]
[ownerID=9905af03-53e5-4715-ada6-1050d42a008f]
[2021/04/06 18:36:27.086 +08:00] [INFO] [manager.go:325] [“get owner”] [“owner info”="[stats] /tidb/stats/owner ownerManager 9905af03-53e5-4715-ada6-1050d42a008f"] [ownerI
D=9905af03-53e5-4715-ada6-1050d42a008f]
[2021/04/06 18:36:27.086 +08:00] [INFO] [manager.go:325] [“get owner”] [“owner info”="[bindinfo] /tidb/bindinfo/owner ownerManager 9905af03-53e5-4715-ada6-1050d42a008f"] [
ownerID=9905af03-53e5-4715-ada6-1050d42a008f]
[2021/04/06 18:36:27.662 +08:00] [WARN] [session.go:1236] [“compile SQL failed”] [conn=2] [error="[planner:1055]Expression #1 of ORDER BY is not in GROUP BY clause and con
tains nonaggregated column ‘’ which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by"] [SQL=“SELECT STATE
AS 状态, ROUND(SUM(DURATION),7) AS 期间, CONCAT(ROUND(SUM(DURATION)/0100,3), ‘%’) AS 百分比 FROM INFORMATION_SCHEMA.PROFILING WHERE QUERY_ID=0 GROUP BY STATE ORDER
BY SEQ"]
[2021/04/06 18:36:27.662 +08:00] [INFO] [conn.go:797] [“command dispatched failed”] [conn=2] [connInfo=“id:2, addr:192.168.150.1:57496 status:10, collation:utf8_general_ci
, user:root”] [command=Query] [status=“inTxn:0, autocommit:1”] [sql="SELECT STATE AS 状态, ROUND(SUM(DURATION),7) AS 期间, CONCAT(ROUND(SUM(DURATION)/0
100,3), ‘%’) AS
百分比 FROM INFORMATION_SCHEMA.PROFILING WHERE QUERY_ID=0 GROUP BY STATE ORDER BY SEQ”] [txn_mode=PESSIMISTIC] [err="[planner:1055]Expression #1 of ORDER BY is not in G
ROUP BY clause and contains nonaggregated column ‘’ which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_b
y\ngithub.com/pingcap/errors.AddStack\n\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/pkg/mod/github.com/pingcap/errors@v0.11.5-0.20201126102027-b0a1
55152ca3/errors.go:174\ngithub.com/pingcap/errors.(*Error).GenWithStackByArgs\n\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/pkg/mod/github.com/ping
cap/errors@v0.11.5-0.20201126102027-b0a155152ca3/normalize.go:156\ngithub.com/pingcap/tidb/planner/core.(*PlanBuilder).checkOnlyFullGroupByWithGroupClause\n\t/home/jenkins
/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/planner/core/logical_plan_builder.go:2604\ngithub.com/pingcap/tidb/planner/core.(*PlanBui
lder).checkOnlyFullGroupBy\n\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/planner/core/logical_plan_builder.go:2535\ngit
hub.com/pingcap/tidb/planner/core.(*PlanBuilder).buildSelect\n\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/planner/core
/logical_plan_builder.go:3066\ngithub.com/pingcap/tidb/planner/core.(*PlanBuilder).Build\n\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.c
om/pingcap/tidb/planner/core/planbuilder.go:616\ngithub.com/pingcap/tidb/planner.optimize\n\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.
com/pingcap/tidb/planner/optimize.go:211\ngithub.com/pingcap/tidb/planner.Optimize\n\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pin
gcap/tidb/planner/optimize.go:108\ngithub.com/pingcap/tidb/executor.(*Compiler).Compile\n\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.co
m/pingcap/tidb/executor/compiler.go:62\ngithub.com/pingcap/tidb/session.(*session).ExecuteStmt\n\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/gi
thub.com/pingcap/tidb/session/session.go:1229\ngithub.com/pingcap/tidb/server.(*TiDBContext).ExecuteStmt\n\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd
/go/src/github.com/pingcap/tidb/server/driver_tidb.go:262\ngithub.com/pingcap/tidb/server.(*clientConn).handleStmt\n\t/home/jenkins/agent/workspace/optimization-build-tidb
-linux-amd/go/src/github.com/pingcap/tidb/server/conn.go:1430\ngithub.com/pingcap/tidb/server.(*clientConn).handleQuery\n\t/home/jenkins/agent/workspace/optimization-build
-tidb-linux-amd/go/src/github.com/pingcap/tidb/server/conn.go:1419\ngithub.com/pingcap/tidb/server.(*clientConn).dispatch\n\t/home/jenkins/agent/workspace/optimization-bui
ld-tidb-linux-amd/go/src/github.com/pingcap/tidb/server/conn.go:1009\ngithub.com/pingcap/tidb/server.(clientConn).Run\n\t/home/jenkins/agent/workspace/optimization-build-
tidb-linux-amd/go/src/github.com/pingcap/tidb/server/conn.go:782\ngithub.com/pingcap/tidb/server.(Server).onConn\n\t/home/jenkins/agent/workspace/optimization-build-tidb-
linux-amd/go/src/github.com/pingcap/tidb/server/server.go:449\nruntime.goexit\n\t/usr/local/go/src/runtime/asm_amd64.s:1357"]
[2021/04/06 18:36:50.597 +08:00] [WARN] [session.go:1236] [“compile SQL failed”] [conn=2] [error="[planner:1055]Expression #1 of ORDER BY is not in GROUP BY clause and con
tains nonaggregated column ‘’ which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by"] [SQL="SELECT STATE
AS 状态, ROUND(SUM(DURATION),7) AS 期间, CONCAT(ROUND(SUM(DURATION)/0
100,3), ‘%’) AS 百分比 FROM INFORMATION_SCHEMA.PROFILING WHERE QUERY_ID=0 GROUP BY STATE ORDER
BY SEQ"]
[2021/04/06 18:36:50.597 +08:00] [INFO] [conn.go:797] [“command dispatched failed”] [conn=2] [connInfo=“id:2, addr:192.168.150.1:57496 status:10, collation:utf8_general_ci
, user:root”] [command=Query] [status=“inTxn:0, autocommit:1”] [sql="SELECT STATE AS 状态, ROUND(SUM(DURATION),7) AS 期间, CONCAT(ROUND(SUM(DURATION)/0
100,3), ‘%’) AS
百分比 FROM INFORMATION_SCHEMA.PROFILING WHERE QUERY_ID=0 GROUP BY STATE ORDER BY SEQ"] [txn_mode=PESSIMISTIC] [err="[planner:1055]Expression #1 of ORDER BY is not in G
ROUP BY clause and contains nonaggregated column ‘’ which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_b
y\ngithub.com/pingcap/errors.AddStack\n\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/pkg/mod/github.com/pingcap/errors@v0.11.5-0.20201126102027-b0a1
55152ca3/errors.go:174\ngithub.com/pingcap/errors.(*Error).GenWithStackByArgs\n\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/pkg/mod/github.com/ping
cap/errors@v0.11.5-0.20201126102027-b0a155152ca3/normalize.go:156\ngithub.com/pingcap/tidb/planner/core.(*PlanBuilder).checkOnlyFullGroupByWithGroupClause\n\t/home/jenkins
/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/planner/core/logical_plan_builder.go:2604\ngithub.com/pingcap/tidb/planner/core.(*PlanBui
lder).checkOnlyFullGroupBy\n\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/planner/core/logical_plan_builder.go:2535\ngit
hub.com/pingcap/tidb/planner/core.(*PlanBuilder).buildSelect\n\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/planner/core
/logical_plan_builder.go:3066\ngithub.com/pingcap/tidb/planner/core.(*PlanBuilder).Build\n\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.c
om/pingcap/tidb/planner/core/planbuilder.go:616\ngithub.com/pingcap/tidb/planner.optimize\n\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.
com/pingcap/tidb/planner/optimize.go:211\ngithub.com/pingcap/tidb/planner.Optimize\n\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pin
gcap/tidb/planner/optimize.go:108\ngithub.com/pingcap/tidb/executor.(*Compiler).Compile\n\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.co
m/pingcap/tidb/executor/compiler.go:62\ngithub.com/pingcap/tidb/session.(*session).ExecuteStmt\n\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/gi
thub.com/pingcap/tidb/session/session.go:1229\ngithub.com/pingcap/tidb/server.(*TiDBContext).ExecuteStmt\n\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd
/go/src/github.com/pingcap/tidb/server/driver_tidb.go:262\ngithub.com/pingcap/tidb/server.(*clientConn).handleStmt\n\t/home/jenkins/agent/workspace/optimization-build-tidb
-linux-amd/go/src/github.com/pingcap/tidb/server/conn.go:1430\ngithub.com/pingcap/tidb/server.(*clientConn).handleQuery\n\t/home/jenkins/agent/workspace/optimization-build
-tidb-linux-amd/go/src/github.com/pingcap/tidb/server/conn.go:1419\ngithub.com/pingcap/tidb/server.(*clientConn).dispatch\n\t/home/jenkins/agent/workspace/optimization-bui
ld-tidb-linux-amd/go/src/github.com/pingcap/tidb/server/conn.go:1009\ngithub.com/pingcap/tidb/server.(*clientConn).Run\n\t/home/jenkins/agent/workspace/optimization-build-
tidb-linux-amd/go/src/github.com/pingcap/tidb/server/conn.go:782\ngithub.com/pingcap/tidb/server.(*Server).onConn\n\t/home/jenkins/agent/workspace/optimization-build-tidb-
linux-amd/go/src/github.com/pingcap/tidb/server/server.go:449\nruntime.goexit\n\t/usr/local/go/src/runtime/asm_amd64.s:1357"]

请自行检查下 insert select into 语句执行期间,TiDB Server log 是否有出现过重启(上面的日志应该非语句执行期间的日志),比如是否有出现过 Welcome to TiDB 关键字 。

或在语句执行期间,TiDB Server 的 log 是否有报错信息~

已经查到原因了是OOM了

如果是因为这个 SQL 导致的 TiDB OOM ,可以将每次批量插入的数据限制的更小点。