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

Identify the threads holding the connection #2019

Open
SharmaAyushi opened this issue Dec 16, 2022 · 0 comments
Open

Identify the threads holding the connection #2019

SharmaAyushi opened this issue Dec 16, 2022 · 0 comments

Comments

@SharmaAyushi
Copy link

@brettwooldridge My application has the following Hikari configuration:

maximumPoolSize=20
minimumIdle = 20
connectionTimeout = 500
maxLifetime = 1800000

Recently I started to see connection timeout errors : Connection is not available, request timed out after 500ms . I already verified that there is no connection leak. After some trial and error, I increased the pool size to 22 and that reduced the number of errors. But I still see some now and then.

To investigate it further, I now create a thread dump whenever this exception is thrown. However, it would be great if I could also identify the threads that hold the connection at that time.

Is it possible to log the thread name/ids that are holding the connection at any moment? I see that when I enable leakDetection, it logs the thread name: Connection leak detection triggered for xxxx on thread xxxx, stack trace follows . But I did not find a way to get this information without triggering leakDetection .

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