Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.
Original topic: 请教下mysql gong away的优化
【Encountered Problem: Problem Phenomenon and Impact】
When using SQL statements to query, the error “MySQL gone away” frequently occurs. How can this be optimized? Which parameters should be adjusted?
How did you query it? Can you describe the issue more clearly? Maybe provide a log screenshot or something similar.
The SQL written in the daemon process is used, and then this error is reported.
This error indicates that the connection between the client and TiDB was interrupted. What kind of SQL is it? Check if there is an OOM (Out of Memory) issue.
Did the corresponding TiDB node crash? Are the network ports accessible?
The node didn’t crash, suspecting an OOM (Out of Memory) issue. The load is very high, but I don’t know how to optimize it.
First, check the dashboard for any slow SQL queries and eliminate those that need to be addressed. If you suspect an OOM (Out of Memory) issue, check the logs and monitoring tools.
Is your connection made through JDBC or something else? Share the connection details so we can take a look.
It is highly likely that a TiDB or TiKV node has OOMed.
Check the startup time of each component to see if they match.
SELECT * FROM information_schema.cluster_info;
Is there a connection time limit, and then it timed out?
This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.