查询超时导致数据库无法连接

为提高效率,提问时请提供以下信息,问题描述清晰可优先响应。

  • 【TiDB 版本】:3.0.5
  • 【问题描述】: 查询数据库是卡住导致异常,数据量不大,开发环境。万级数据关联

spark执行也报错了:

20/03/24 14:52:54 WARN PDClient: failed to get member from pd server.
shade.io.grpc.StatusRuntimeException: UNKNOWN: context deadline exceeded
	at shade.io.grpc.stub.ClientCalls.toStatusRuntimeException(ClientCalls.java:210)
	at shade.io.grpc.stub.ClientCalls.getUnchecked(ClientCalls.java:191)
	at shade.io.grpc.stub.ClientCalls.blockingUnaryCall(ClientCalls.java:124)
	at org.tikv.kvproto.PDGrpc$PDBlockingStub.getMembers(PDGrpc.java:898)
	at com.pingcap.tikv.PDClient.getMembers(PDClient.java:272)
	at com.pingcap.tikv.PDClient.updateLeader(PDClient.java:322)
	at com.pingcap.tikv.PDClient.lambda$initCluster$12(PDClient.java:381)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)
20/03/24 14:52:54 WARN PDClient: Update leader failed

binlog也异常了

MySQL [(none)]> show drainer status;
ERROR 1105 (HY000): context deadline exceeded
MySQL [(none)]> show pump status;
ERROR 1105 (HY000): context deadline exceeded
MySQL [(none)]> 

麻烦检查一下 PD 这边服务的状态, 以及执行{tidb_ansible_path}/resource/bin/pd-ctl health -u http://{pd_ip}:{pd_port}{tidb_ansible_path}/resource/bin/pd-ctl member -u http://{pd_ip}:{pd_port}{tidb_ansible_path}/resource/bin/pd-ctl store -u http://{pd_ip}:{pd_port}

重启,好了

好的。有问题欢迎再开新帖反馈。

好的,运行下载的哪个python脚本报错文件不存在

tidb@tidb1 tidb-ansible-3.0.5]$ python info_gathering.py
python: can't open file 'info_gathering.py': [Errno 2] No such file or directory

我这边把下载的脚本放到中控机上面执行无法重现问题。麻烦看看 info_collecting.py 文件路径是否有问题。

[tidb@tidb1 tidb-ansible-3.0.5] 这个路径必须是tidb-ansible?

这边的文件名是否有误?文件名应该为 info_collecting.py

文件名是指哪些?tidb安装的没有修改过

直接复制的这个,没有改:pensive: 可以了,不过现在没有异常,下次遇到再请教

好的。感谢反馈。我们这边也修改一下。