Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] druid init method run slow : line895 this.createPhysicalConnection() #6187

Open
lucky-lbc opened this issue Oct 21, 2024 · 3 comments
Open

Comments

@lucky-lbc
Copy link

Database Type

mysql

Database Version

mysql8.0.31

Druid Version

1.2.23

JDK Version

jdk17

Error SQL

no sql
just spring boot init . and run in druid init() method. was slow

Testcase Code

No response

Stacktrace Info

No response

Error Info

druid init method was slow. debug this in line 895 method: this.createPhysicalConnection();
图片
and in this method:
图片
when line 1727: var29 = true; is slowly

i want to know why ?. and how to handle it

@lucky-lbc
Copy link
Author

spring boot version 3.2.x

@lucky-lbc
Copy link
Author

It may be a decompilation issue。debug var29 can step into .
图片
i think that is slow line : Connection rawConn = this.getDriver().connect(url, info);

@lucky-lbc
Copy link
Author

finally i found this slowly code :
class: ConnectionImpl . package com.mysql.cj.jdbc;
inetSocketAddress.getHostName()
It may be a DNS resolution issue。 but no idea to deal it ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant