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

All hikaricp connection are in use and never recovery util restart #467

Closed
jilen opened this issue Oct 23, 2015 · 7 comments
Closed

All hikaricp connection are in use and never recovery util restart #467

jilen opened this issue Oct 23, 2015 · 7 comments

Comments

@jilen
Copy link

jilen commented Oct 23, 2015

  • HikariCP Version: 2.3.7
  • Slick: 3.1.0
  • mysql-connector-j: 5.1.30

StackOverflow Link
Full log https://gist.github.com/jilen/f4edf44f4013ffe7a1eb

@brettwooldridge
Copy link
Owner

@jilen Did you get an answer for this in the Slick discussion group?

@jilen
Copy link
Author

jilen commented Nov 2, 2015

@jilen
Copy link
Author

jilen commented Nov 26, 2015

Seems related to slick/slick#1274

@kosakriszi
Copy link

I have this exact issue, but I am not using slick.

HikariCP: 2.4.3
mysql-connector-j: 5.1.14 (I have no control over this)

Hikari Debug Log: https://gist.github.com/kosakriszi/7bfca3f844bb6f4d7a47

What's interesting to me is that this issue only occurs when executing an SQL insert statement. All other cases seem to be functioning properly.

@jnehlmeier
Copy link

@kosakriszi are you sure your code closes connections correctly? AFAICT in HikariCP active means a connection is handed out of the pool and not yet returned to the pool by calling connection.close(). So active does not necessarily mean that SQL statements are currently executed on all these connections.

You can use the leakDetectionThreshold parameter to get stack traces in the log when a connection has been handed out too long compared to your average query duration. That way you can investigate your code to make sure it behaves correctly.

@kosakriszi
Copy link

@jnehlmeier Thanks for the reply! I am always sure to close my connections after each query, so I do not believe that that is the issue.

I will try out the leakDetectionThreshold parameter, and see what more information I can gather.

@kosakriszi
Copy link

I actually had a rouge connection that I wasn't closing, so my issue is invalidated.

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

No branches or pull requests

4 participants