Bug #115586 | When upgrading to mysql connetor/j-8.4.0, creating a connection becomes too slow | ||
---|---|---|---|
Submitted: | 15 Jul 2024 3:36 | Modified: | 6 Dec 2024 16:18 |
Reporter: | chen yi (OCA) | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | Connector / J | Severity: | S1 (Critical) |
Version: | 8.4.0 | OS: | Windows (windows 11) |
Assigned to: | CPU Architecture: | x86 (13th Gen Intel(R) Core(TM) i7-13700H 2.40 GHz) | |
Tags: | slow |
[15 Jul 2024 3:36]
chen yi
[17 Jul 2024 3:19]
chen yi
The root cause is in ConnectionImpl L#458 this.connectionSpan.setAttribute(TelemetryAttribute.NETWORK_PEER_ADDRESS, inetSocketAddress.getHostName()); inetSocketAddress.getHostName() resolve host name too slow.
[17 Jul 2024 4:21]
chen yi
When we configured DNS reverse lookup, the time taken to create connections dropped to milliseconds. However, most of our internal mysql servers currently do not have reverse lookup configured.
[17 Jul 2024 9:08]
MySQL Verification Team
Hello chen yi, Thank you for the report and feedback. regards, Umesh
[1 Aug 2024 8:18]
MySQL Verification Team
Bug #115736 marked as duplicate of this one
[6 Dec 2024 16:18]
Daniel So
Posted by developer: Added the following entry to the Connector/J 9.2.0 changelog: "It might take a long time to create a connection to a server with Connector/J 8.4.0 or later. It was because Connector/J 8.4.0 and later always performed a reverse DNS lookup on the host IP address. With this patch, the lookup is only performed when OpenTelemetry is used, in which case the lookup is required."