Help Center/
Cloud Data Migration/
FAQs/
Troubleshooting/
What Should I Do If Error Message "Lost connection to MySQL server during query" Is Displayed During Migration from MySQL to DWS?
Updated on 2023-06-21 GMT+08:00
What Should I Do If Error Message "Lost connection to MySQL server during query" Is Displayed During Migration from MySQL to DWS?
Symptom
Error message "GENERIC_JDBC_CONNECTOR_0904:ERROR occurs while retrieving data from result. Cause : closed connection:stream closed con:192.168.XX.XX." is displayed during data migration from MySQL to DWS.
Fault Analysis
- The error may occur due to a large amount of user data or a connection interruption. Check whether the timeout duration is configured in the advanced attributes.
- The timeout duration is 6,000,000 milliseconds, which is large enough. Check whether the MySQL database of the customer is normal. Run the SQL statement for querying the source in the log and run the SQL statement on the MySQL client to check whether an error is reported.
- When the query statement is executed to query the entire table, error message "Lost connection to MySQL server during query" is displayed. When the count statement is executed again to query data, the query is successful.
- The value of max_allowed_packet for the MySQL database is too small. However, the value is 1 GB and cannot be increased.
- Check the connector configuration. It is found that Fetch Size is set to 3000. As a result, the volume of data to be queried in a batch may exceed 1 GB, and an error is reported.
Solution
- Set Fetch Size to 1000.
- Use the where clause to periodically migrate some data.
Parent topic: Troubleshooting
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
The system is busy. Please try again later.
For any further questions, feel free to contact us through the chatbot.
Chatbot