Consultation on optimizing MySQL "gone away" issue

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

Original topic: 请教下mysql gong away的优化

| username: TiDBer_6Jph0ggb

【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?

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

How did you query it? Can you describe the issue more clearly? Maybe provide a log screenshot or something similar.

| username: TiDBer_6Jph0ggb | Original post link

The SQL written in the daemon process is used, and then this error is reported.

| username: 啦啦啦啦啦 | Original post link

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.

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

Did the corresponding TiDB node crash? Are the network ports accessible?

| username: TiDBer_6Jph0ggb | Original post link

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.

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

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.

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

Is your connection made through JDBC or something else? Share the connection details so we can take a look.

| username: 我是咖啡哥 | Original post link

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;
| username: ealam_小羽 | Original post link

Is there a connection time limit, and then it timed out?

| username: system | Original post link

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