ERROR 2013 (HY000): Lost connection to MySQL server at 'reading initial

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

Original topic: ERROR 2013 (HY000): Lost connection to MySQL server at 'reading initial

| username: Wander

[TiDB Usage Environment] Production Environment / Testing / PoC
[TiDB Version]
[Reproduction Path] What operations were performed when the issue occurred
[Encountered Issue: Issue Symptoms and Impact]
[Resource Configuration] Go to TiDB Dashboard - Cluster Info - Hosts and take a screenshot of this page
[Attachments: Screenshots / Logs / Monitoring]

A shell script connects to the database and executes queries. Occasionally, the above error occurs. The maximum number of connections is set to 3000, and the number of connections used is far less than 3000.

| username: TiDBer_jYQINSnf | Original post link

Check if TiDB is out of memory (OOM)? It usually behaves like this when it runs out of memory.

| username: redgame | Original post link

You still need to check the logs; there will be obvious errors.