tidb 一次性update 100w条数据导致重启

tidb v5.1.1

一次性update 100w条数据,导致tidb server掉线重启。
[2021/09/27 17:17:36.953 +08:00] [WARN] [grpclogger.go:85] [“grpc: Server.Serve failed to create ServerTransport: connection error: desc = “transport: http2Server.HandleStreams failed to receive the preface from client: EOF””] [system=grpc] [grpc_log=true]
[2021/09/27 17:17:41.872 +08:00] [INFO] [2pc.go:776] [“send TxnHeartBeat”] [startTS=428011461877170197] [newTTL=128550]
[2021/09/27 17:17:44.414 +08:00] [INFO] [client.go:328] ["[pumps client] write binlog to avaliable pumps all failed, will try unavailable pumps"]
[2021/09/27 17:17:44.414 +08:00] [WARN] [session.go:605] [“can not retry txn”] [conn=341] [label=general] [error="[global:3]critical error rpc error: code = ResourceExhausted desc = trying to send message larger than max (4097419655 vs. 2147483647)"] [IsBatchInsert=false] [IsPessimistic=false] [InRestrictedSQL=false] [tidb_retry_limit=10] [tidb_disable_txn_auto_retry=true]
[2021/09/27 17:17:44.414 +08:00] [WARN] [session.go:621] [“commit failed”] [conn=341] [“finished txn”=“Txn{state=invalid}”] [error="[global:3]critical error rpc error: code = ResourceExhausted desc = trying to send message larger than max (4097419655 vs. 2147483647)"]
[2021/09/27 17:17:44.432 +08:00] [WARN] [session.go:1533] [“run statement failed”] [conn=341] [schemaVersion=12389] [error="[global:3]critical error rpc error: code = ResourceExhausted desc = trying to send message larger than max (4097419655 vs. 2147483647)"] [session="{\n “currDBName”: “polcent_db”,\n “id”: 341,\n “status”: 2,\n “strictMode”: true,\n “user”: {\n “Username”: “tiuser1”,\n “Hostname”: “10.79.166.195”,\n “CurrentUser”: false,\n “AuthUsername”: “tiuser1”,\n “AuthHostname”: “%”\n }\n}"]
[2021/09/27 17:17:44.432 +08:00] [FATAL] [conn.go:871] [“critical error, stop the server”] [conn=341] [error="[global:3]critical error rpc error: code = ResourceExhausted desc = trying to send message larger than max (4097419655 vs. 2147483647)"] [stack=“github.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:871\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:485”]
[2021/09/27 17:18:01.451 +08:00] [INFO] [printer.go:33] [“Welcome to TiDB.”] [“Release Version”=v5.1.1] [Edition=Community] [“Git Commit Hash”=797bddd25310ed42f0791c8eccb78be8cce2f502] [“Git Branch”=heads/refs/tags/v5.1.1] [“UTC Build Time”=“2021-07-28 11:00:26”] [GoVersion=go1.16.4] [“Race Enabled”=false] [“Check Table Before Drop”=false] [“TiKV Min Version”=v3.0.0-60965b006877ca7234adaced7890d7b029ed1306]

因为binlog grpc 限制了2G,100w数据肯定超过了限制,所以tidb-server会重启。

ignore-error参数可以让tidb-server不会重启,但是一旦有报错,会导致该tidb-server节点后续都不会再写 binlog,在生产上慎用。

1赞