In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-04 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
1. basic information,
mysql 5.7.22 nodes: datanode1, datanode2, datanode3
mycat 1.6.5.
2. Fault phenomenon: When importing tens of millions of test data, report 2013, 2006, or 3009 connection interruption
ERROR 2013 (HY000) at line 176 in file: '/soft/TEST_1KW.sql': Lost connection to MySQL server during query
ERROR 2006 (HY000) at line 177 in file: '/soft/TEST_1KW.sql': MySQL server has gone away
No connection. Trying to reconnect...
Connection id: 142
Current database: mycatdb
View vim log4j2.xml, Mycat log configuration, configuration changed to 2500M, log level changed to debug
3. Monitor log size using a for loop. The log soon reached 251M,
for i in {0.. 10000};do ls -lh;sleep 1;clear;done
4. After mycat hangs, check the amount of imported data and find that only 80W data has been imported.
MySQL [mycatdb]> select count(*) from test_ber;
+--------+
| COUNT0 |
+--------+
| 826916 |
+--------+
1 row in set (0.17 sec)
======================================================
(a lot of tests were also done during this period, eliminating other configuration, java, memory, etc. reasons one by one) directly said the solution,
Conclusion: mycat is dead because the log is full. So I wrote a for loop that monitored log size and cleaned logs every second (running in mycat logs directory):
for i in {0.. 10000};do ls -lh;sleep 1;clear;echo "" > mycat.log;done
Method: Use the for loop
Restart myat and check mycat listening.
Log in to mycat and reimport the data:
Data is being imported:
The log is small and not full because it has been cleaned:
Import complete: no error reported
View data volume: 1KW data, data complete.
====================================================
Update, in fact, modify the log4j2.xml file, change the log level can also be resolved.
Thank you for your attention.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.