tidb-server hangs when inserting data
Please answer these questions before submitting your issue. Thanks!
- What did you do? If possible, provide a recipe for reproducing the error.
你好 想通过TiDB-Binlog 连接mysql做实时备份。
按教程一开始启动全部正常,pump Drainer 启动正常,日志也无报错
可是一执行insert 语句, tidb进程就卡死,只有重启tidb服务才能恢复正常
- What did you expect to see?
tidb.log内容
2017/09/30 16:42:50.219 server.go:162: [info] Server is running MySQL Protocol at [0.0.0.0:4000]
2017/09/30 16:42:50.219 main.go:178: [info] disable Prometheus push client
2017/09/30 16:42:50.219 systime_mon.go:24: [info] start system time monitor
2017/09/30 16:42:50.219 http_status.go:58: [info] Listening on :10080 for status and metrics report.
2017/09/30 16:42:50.226 simple.go:127: [info] [0] execute rollback statement
2017/09/30 16:42:50.226 txn.go:174: [info] [kv] Rollback txn 394988347771846666
2017/09/30 16:42:57.166 server.go:118: [info] [1] new connection 192.168.2.68:2044
2017/09/30 16:42:57.167 conn.go:273: [warning] parse attrs error:EOF
/home/jenkins/workspace/build_tidb_master/go/src/github.com/pingcap/tidb/server/conn.go:290:
2017/09/30 16:42:57.187 set.go:145: [info] [1] set system variable autocommit = 1
2017/09/30 16:42:57.205 set.go:145: [info] [1] set system variable net_write_timeout = 600
2017/09/30 16:42:57.205 set.go:145: [info] [1] set system variable sql_select_limit = 502
2017/09/30 16:42:57.206 metrics.go:355: [warning] [EXPENSIVE_QUERY] /* ApplicationName=DataGrip 2017.2.2 */ select * from t1
2017/09/30 16:42:57.217 set.go:145: [info] [1] set system variable sql_select_limit = 18446744073709551615
2017/09/30 16:43:06.355 set.go:145: [info] [1] set system variable net_write_timeout = 600
2017/09/30 16:54:06.112 binloginfo.go:88: [error] write binlog error rpc error: code = Unavailable desc = grpc: the connection is unavailable
2017/09/30 16:54:07.112 binloginfo.go:88: [error] write binlog error rpc error: code = Unavailable desc = grpc: the connection is unavailable
2017/09/30 16:54:08.112 binloginfo.go:88: [error] write binlog error rpc error: code = Unavailable desc = grpc: the connection is unavailable
2017/09/30 16:54:09.113 binloginfo.go:88: [error] write binlog error rpc error: code = Unavailable desc = grpc: the connection is unavailable
2017/09/30 16:54:10.113 binloginfo.go:88: [error] write binlog error rpc error: code = Unavailable desc = grpc: the connection is unavailable
2017/09/30 16:54:11.113 binloginfo.go:88: [error] write binlog error rpc error: code = Unavailable desc = grpc: the connection is unavailable
2017/09/30 16:54:12.113 binloginfo.go:88: [error] write binlog error rpc error: code = Unavailable desc = grpc: the connection is unavailable
2017/09/30 16:54:13.114 binloginfo.go:88: [error] write binlog error rpc error: code = Unavailable desc = grpc: the connection is unavailable
2017/09/30 16:54:14.114 binloginfo.go:88: [error] write binlog error rpc error: code = Unavailable desc = grpc: the connection is unavailable
2017/09/30 16:54:15.114 binloginfo.go:88: [error] write binlog error rpc error: code = Unavailable desc = grpc: the connection is unavailable
2017/09/30 16:54:16.115 binloginfo.go:88: [error] write binlog error rpc error: code = Unavailable desc = grpc: the connection is unavailable
2017/09/30 16:54:17.115 binloginfo.go:88: [error] write binlog error rpc error: code = Unavailable desc = grpc: the connection is unavailable
2017/09/30 16:54:18.115 binloginfo.go:88: [error] write binlog error rpc error: code = Unavailable desc = grpc: the connection is unavailable
2017/09/30 16:54:19.115 binloginfo.go:88: [error] write binlog error rpc error: code = Unavailable desc = grpc: the connection is unavailable
2017/09/30 16:54:20.115 binloginfo.go:88: [error] write binlog error rpc error: code = Unavailable desc = grpc: the connection is unavailable
2017/09/30 16:54:21.116 binloginfo.go:88: [error] write binlog error rpc error: code = Unavailable desc = grpc: the connection is unavailable
2017/09/30 16:54:22.116 binloginfo.go:88: [error] write binlog error rpc error: code = Unavailable desc = grpc: the connection is unavailable
2017/09/30 16:54:23.116 binloginfo.go:88: [error] write binlog error rpc error: code = Unavailable desc = grpc: the connection is unavailable
2017/09/30 16:54:24.116 binloginfo.go:88: [error] write binlog error rpc error: code = Unavailable desc = grpc: the connection is unavailable
2017/09/30 16:54:25.116 binloginfo.go:88: [error] write binlog error rpc error: code = Unavailable desc = grpc: the connection is unavailable
2017/09/30 16:54:26.117 binloginfo.go:88: [error] write binlog error rpc error: code = Unavailable desc = grpc: the connection is unavailable
2017/09/30 16:54:26.117 session.go:309: [warning] [1] finished txn:
pump.toml配置文件
addr = "127.0.0.1:8250" advertise-addr = "" gc = 7 data-dir = "data.pump" log-file = "pump.log" heartbeat-interval = 3 pd-urls = "http://192.168.2.194:2379" socket = "unix:///tmp/pump.sock"
drainer.toml配置文件 addr = "127.0.0.1:8249" detect-interval = 10 data-dir = "data.drainer" pd-urls = "http://192.168.2.194:2379" log-file = "drainer.log" [syncer] ignore-schemas = "INFORMATION_SCHEMA,PERFORMANCE_SCHEMA,mysql" txn-batch = 1 worker-count = 1 disable-dispatch = false db-type = "mysql" replicate-do-db =["test2"] [syncer.to] host = "192.168.2.68" user = "root" password = "123456" port = 3306
mysql 是在192.168.2.68上。 希望指点迷津
-
What did you see instead?
-
What version of TiDB are you using (
tidb-server -V)?
Release Version: 0.9.0 Git Commit Hash: fe31f4b5974a68a3e5698f2b3473101691217d18 Git Commit Branch: master UTC Build Time: 2017-09-20 01:56:02
@chenbobaoge
2017/09/30 16:54:26.117 binloginfo.go:88: [error] write binlog error rpc error: code = Unavailable desc = grpc: the connection is unavailable 2017/09/30 16:54:26.117 session.go:309: [warning] [1] finished txn:, [global:3]critical error rpc error: code = Unavailable desc = grpc: the connection is unavailable
From the log I can tell that there is something wrong with the communication between tidb-server and binlog module. @ian PTAL
@chenbobaoge please provide tidb process' cmd parameters and config file
@GregoryIan tidb启动命令如下: nohup tidb-latest-linux-amd64/bin/tidb-server --store=tikv --path="192.168.2.194:2379" --log-file=tidb.log --binlog-socket=unix:///tmp/pump.sock &
我就用汉语交流了,你的英语我看得懂,但我要说英语,怕你看不懂了。。。。
same issue https://github.com/pingcap/docs-cn/issues/360, move there