9002 - TiKV server timeout error when creating a foreign key

Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: 9002 - TiKV server timeout 创建外键的时候报这个错误

| username: TiDBer_7Q5CQdQd

Is it possible to solve this by modifying the timeout in the configuration file? If so, which parameter should be changed?

| username: tidb菜鸟一只 | Original post link

Take a look at the TiKV log errors.

| username: zhanggame1 | Original post link

Check if this TiKV node is still online?

| username: 裤衩儿飞上天 | Original post link

  1. tiup cluster display XXXX; check the node status
  2. TiDB supports foreign keys starting from version 6.6, but using foreign keys with large data volumes and in a distributed environment may lead to performance issues. It is recommended to test and use cautiously.
    For more details, refer to: Foreign Key Constraints | PingCAP Documentation Center