0

I'm using MySQL 5.7 on aws rds engine 5.7.mysql_aurora.2.04.3. I keep running into ERROR 2013 (HY000): Lost connection to MySQL server during query. It even happens when I run check table foobars.

The foobars table is InnoDB with over 15 million records and over 5 GB in size. I've set pretty much all of the timeout settings up really high but the issue still occurs. I'm using a db.r4.2xlarge instance.

Any ideas as to why this might be happening with check table? Additionally I also get the lost connection error when I do a alter table query.

Thank you.

user2031423
  • 347
  • 4
  • 7
  • Possible duplicate of [Error Code: 2013. Lost connection to MySQL server during query](https://stackoverflow.com/questions/10563619/error-code-2013-lost-connection-to-mysql-server-during-query) – Lamanus Sep 22 '19 at 01:58
  • Verify that the server isn't crashing and restarting -- that is one possible cause of this error and can happen due to a corrupted table or server-side bug. `SHOW STATUS LIKE 'UPTIME';` shows seconds since server restart. Run that before and after, and see if the number gets smaller (crash/restart) or larger (not). – Michael - sqlbot Sep 22 '19 at 02:45
  • @Michael-sqlbot I have confirmed that the server isn't crashing and restarting. Uptime continues to get larger. – user2031423 Sep 23 '19 at 05:59

1 Answers1

0

I think part of the issue may have been that the long output of the check table query was crashing my client. I was able to get check table working by passing in the --quick flag when I connected with my mysql client.

user2031423
  • 347
  • 4
  • 7