[tikv:9001]PD server timeout[try again later]
We are seeing this error quite often, almost once for two days, it reports with region not found for key and PD server timeout.
We are syncing data from MySQL, tidb is under heavy write. this is our setting for syncer:
meta = "./syncer.meta"
worker-count = 256 #we set this large or TiDB can not keep up with MySQL
batch = 8
When the error occurs, we can not select or update some table any more, trying manually switch PD leader from one to another can bring the cluster to normal again but won't last long. If we don't interfere, it will recover itself but it will take longer.
Our tidb cluster has 98386 regions now and with storage size 13TB,
2017/11/06 11:30:05.040 backoff.go:205: [warning] backoffer.maxSleep 5000ms is exceeded, errors:
region not found for key "t\x80\x00\x00\x00\x00\x00\x02\x01_r\x00\x00\x00\x00\x00\x00\x00\x00"
region not found for key "t\x80\x00\x00\x00\x00\x00\x02\x01_r\x00\x00\x00\x00\x00\x00\x00\x00"
region not found for key "t\x80\x00\x00\x00\x00\x00\x02\x01_r\x00\x00\x00\x00\x00\x00\x00\x00"
2017/11/06 11:30:05.040 adapter.go:293: [warning] slow-query sql=select * from xxx limit 10 type=slow-query connectionId=3 costTime=5.704711563s succ=false
2017/11/06 11:30:05.040 conn.go:427: [warning] [3] dispatch error:
id:3, addr:192.168.20.8:51432 status:2, collation:utf8_general_ci, user:root
"select * from xxx limit 10"
[tikv:9001]PD server timeout[try again later]
/go/src/github.com/pingcap/tidb/store/tikv/region_cache.go:313:
/go/src/github.com/pingcap/tidb/store/tikv/region_cache.go:157:
/go/src/github.com/pingcap/tidb/store/tikv/coprocessor.go:248:
/go/src/github.com/pingcap/tidb/distsql/new_distsql.go:84:
/go/src/github.com/pingcap/tidb/distsql/new_distsql.go:106:
/go/src/github.com/pingcap/tidb/executor/new_distsql.go:97:
/go/src/github.com/pingcap/tidb/executor/executor.go:342:
/go/src/github.com/pingcap/tidb/executor/adapter.go:76:
/go/src/github.com/pingcap/tidb/server/driver_tidb.go:297:
/go/src/github.com/pingcap/tidb/server/conn.go:786:
/go/src/github.com/pingcap/tidb/server/conn.go:751:
2017/11/06 11:30:56.048 simple.go:127: [info] [0] execute rollback statement
I can not find any ERROR log the PD's log
Version info
tidb-server: Release Version: 1.0.0 Git Commit Hash: e40ad67efa9408230773a158fd9f4558580cc903 Git Branch: master UTC Build Time: 2017-10-27 01:24:42
pd-server Release Version: 1.0.0 Git Commit Hash: 89cc5f6827cf8f79f3712f8720d6f04364685c09 Git Branch: release-1.0 UTC Build Time: 2017-10-23 08:15:23
@Darren Thanks for your feedback! @disksing PTAL
Hi @Darren, could you take a look at the pd-server's load?
@disksing
Thanks for your remind!
I forgot that pd-server need disk write too (not only CPU), other process on the leader pd-server may eat up the disk. I shall make the pd-server dedicated!
I'll report back next time it occurs and watch the pd-server's load.
Hi @Darren , you may also consider to increase tikv's region heartbeat interval (set this config to a longer duration, 180s for example) if pd-server is not able to process heartbeats in time.
@darren thanks a lot for your interest in TiDB. If you want to communicate more effectively, you can send a email to [email protected], we might communicate via Wechat online.