You can use this guide to help you diagnose and solve basic problems while using TiDB. If your problem is not resolved, please collect the following information and create an issue:
error / fatal / panic information in the log of the component that reports the errordmesgFor other information, see Frequently Asked Questions (FAQ).
tidb-server, pd-server, and tikv-server.Use the ps command to check if all the processes are running.
tidb-server log to see if the following messages are displayed:
tikv-server cannot be connected. Check the state and log of pd-server and tikv-server.If the data is cleared and the services are re-deployed, make sure that:
tikv-server and pd-server are cleared.
The specific data is stored in tikv-server and the metadata is stored in pd-server. If only one of the two servers is cleared, the data will be inconsistent.pd-server and tikv-server are cleared and the pd-server and tikv-server are restarted, the tidb-server must be restarted too.
The cluster ID is randomly allocated when the pd-server is initialized. So when the cluster is re-deployed, the cluster ID changes and you need to restart the tidb-server to get the new cluster ID.tidb-serverSee the following for the situations when the tidb-server cannot be started:
lsof -i:port command to show all the networking related to a given port and make sure the port to start the tidb-server is not occupied.Cannot connect to pd-server.
pd-server process.tikv-serverSee the following for the situations when the tikv-server cannot be started:
lsof -i:port command to show all the networking related to a given port and make sure the port to start the tikv-server is not occupied.pd-server.
pd-server process.pd-serverSee the following for the situations when the pd-server cannot be started:
lsof -i:port command to show all the networking related to a given port and make sure the port to start the pd-server is not occupied.Is the process started on the foreground? The process might exit because the client aborts.
Is nohup+& run in the command line? This might cause the process to abort because it receives the hup signal. It is recommended to write and run the startup command in a script.
Please provide panic log and create an issue.
Make sure the network parameters of the operating system are correct, including but not limited to:
tidb-server starting port.Before starting the process, make sure the result of ulimit -n is large enough. It is recommended to set the value to unlimited or larger than 1000000.
First, check the SLOW-QUERY log and see if it is because of some inappropriate SQL statement. If you failed to solve the problem, provide the following information:
tidb-server/pd-server/tikv-server instances are deployed?pd-servers and tikv-servers deployed separately?top -H command.What’s on this page