What Should I Do If a JDBC Connection Timeout Error Is Reported During MySQL Migration?
Symptom
The following error message is displayed during MySQL migration: "Unable to connect to the database server. Cause: connect timed out."
Possible Cause
The table has a large data volume, and the source end uses the where statement to filter data. However, the column is not an index column or the column values are not discrete. As a result, the entire table is scanned during the query, causing a JDBC connection timeout. As shown in Figure 1, the c_date field is not an index column.
Solution
- Contact the DBA to modify the table structure, set the columns to be filtered as index columns, and try again.
If the failure persists because the data is not discrete, perform 2 to 4 and increase the JDBC timeout duration.
- Locate the MySQL link name based on the job and obtain the link information.
Figure 2 Link information
- Click the Links tab and click Edit to edit the link.
Figure 3 Editing the link
- Click Show Advanced Attributes, add parameters connectTimeout and socketTimeout and their values in Link Attributes , and click Save.
Figure 4 Editing advanced attributes
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.
For any further questions, feel free to contact us through the chatbot.
Chatbot