Is there a way to control TiDB to automatically start after stopping and restarting the server?

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

Original topic: 有办法控制tidb stop后,重启服务器tidb自动启动吗

| username: chenhanneu

[TiDB Usage Environment] Production Environment / Testing / PoC
[TiDB Version]
[Reproduction Path] What operations were performed that led to the issue
[Encountered Issue: Problem Phenomenon and Impact]
After using tiup stop to shut down the cluster, all servers were restarted for maintenance operations. Once the servers are up, TiDB is automatically brought up. However, the server startup times are not fixed. Is there a way to prevent TiDB from automatically starting and instead start it manually at the end?

If the machines start randomly, could the time intervals between different servers starting affect TiDB?

| username: hey-hoho | Original post link

tiup cluster disable cluster-name

| username: 像风一样的男子 | Original post link

It’s okay. For example, if the KV server starts first, it won’t come up. Once the PD server starts, the KV server will retry and restart.

| username: dba远航 | Original post link

You can use NTP time service to synchronize the time across all servers to avoid cluster anomalies.

| username: Fly-bird | Original post link

tiup cluster disable cluster-name

| username: zhanggame1 | Original post link

Besides disabling it, you can also log in to the physical machine of the TiDB server and use systemctl disable for that TiDB service.

| username: Kongdom | Original post link

There should be no impact. All PD nodes will start first, followed by TiKV, and only after all TiKV nodes are up will TiDB start to provide services externally.

The cluster startup operation will start all components of the entire TiDB cluster in the following order: PD → TiKV → Pump → TiDB → TiFlash → Drainer → TiCDC → Prometheus → Grafana → Alertmanager.

| username: swino | Original post link

Disable automatic restart

| username: system | Original post link

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.