-
-
Notifications
You must be signed in to change notification settings - Fork 283
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
Unable to monitor HikariCP pools created with play-slick due to conflicting poolName #348
Comments
@balagez Thanks for the pointer. If I'm understanding things correctly, we should document this problem and suggest to declare the |
@dotta Unfortunately there's no workaround for end users because due to that bug I mentioned Slick currently doesn't read The only opportunity for a workaround I see is rather clumsy, that is to call In the meantime I patched Slick so the fix is coming in Slick 3.2.0. It's up to you whether you want to implement such a clumsy workaround or just wait for the next Slick release. In the latter case I'm okay with closing this issue, and maybe the documentation could mention that currently it's impossible to implement JMX monitoring of HikariCP pools with play-slick/Slick 3.1.0. |
There's a bug in Slick's HikariCP code which makes Slick use the
name
parameter offorConfig
as the pool name. If an application that uses play-slick has more than one connection pools, because of this Slick bug, all pools are created with the samedb
pool name. This is serious problem if we want to monitor HikariCP connection pools because HikariCP registers MBeans using thepoolName
and these names are conflicting, so only the first MBean is registered successfully, the rest of them fail.Of course the ultimate solution would be to fix the Slick bug, but until then, maybe play-slick could do something to provide Slick with the correct pool names.
Example play-slick configuration based on the Play framework documentation:
And relevant parts of the HikariCP debug log:
The text was updated successfully, but these errors were encountered: