1

I sometimes get the following exception

SQLNestedException: Cannot get a connection, pool error Timeout waiting for idle object

While using play framework and scalikeJDBC to connect to a MariaDB instance

Googling around showed it can either be that connections aren't being properly closed or that I should configure my thread pool to be bigger

Now onto the actual question:

I'd like to investigate further but I need a way to monitor said connection thread pool, ideally in the form a graph of sorts, but how?

I have no idea how to configure JMX and MBeans for netty (Play uses netty, right?) or if it's possible at all and google is not helping. I don't even know if this would be the right approach so I'm giving a bounty sized ammount of points (or even more) to whoever can provide a sweet set of steps on how to proceed

JSelser
  • 3,510
  • 1
  • 19
  • 40

1 Answers1

1

A bit of googling lends me to think that scalikeJDBC use commons dbcp as the underlying connection pool.

More googling links back to Monitoring for Commons DBCP? , which proposes to monitor exactly what you want I believe !

Community
  • 1
  • 1
C4stor
  • 8,355
  • 6
  • 29
  • 47
  • definetiley looks like it, thanks! only issue is that the author assumes I'll be generating logs about the connections and doesn't specify how to go about it, have you used it? – JSelser Jan 10 '17 at 18:26
  • depend on what DataSource you used in ConnectionPool. one can choose say HikariCP to replace the default dbcp if they want. – linehrr Mar 05 '19 at 17:46