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

Only one active connection? #545

Closed
maudewest opened this Issue Jan 13, 2016 · 3 comments

Comments

Projects
None yet
2 participants
@maudewest
Copy link

maudewest commented Jan 13, 2016

We're testing HikariCP at the client and have had great initial success - an application loading 1 million records over multiple HTTP threads and putting them in the DB had it's run time cut by 70% after moving from Tomcat CP to Hikari CP!

Now we are having an issue with a new application. The application is a batch process that launches N threads. Each thread starts a transaction and ETLs some data from a few tables to some other tables. This application slowed down markedly after changing the connection pool to Hikari from Tomcat.

Looking in JMX Metrics, it appears that only one active connection is ever requested out of a maximumPoolSize=10. The pool is a fixed-size pool. Changing the connection pool back to TomcatCP seems to speed up the application several times.

Perhaps someone has seen this before? Any suggestions?

@maudewest

This comment has been minimized.

Copy link
Author

maudewest commented Jan 13, 2016

Oracle 11g, running Groovy 2.3 on Java 8.

@brettwooldridge

This comment has been minimized.

Copy link
Owner

brettwooldridge commented Jan 14, 2016

Can you get a thread dump when you think all threads should be running but think they aren't? If they're running, they must be blocked somewhere.

EDIT: also check the obvious, like forgetting to set auto-commit to false etc. Post the config (as output by debug level logging), as well as a relavent thread dump.

@maudewest

This comment has been minimized.

Copy link
Author

maudewest commented Jan 14, 2016

This was a bug in our side, using some unrelated non-threadsafe code. No issue.

After fixing the bug, the code runs about 2x faster using HikariCP than Tomcat CP.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.