Creating too many sleeps in Mariadb

Hello guys,
We are encountering high number of “sleeps” in Mariadb connected to metabase and i have attached i screenshot for the same . Please help to find the reason/solution for this .
I am in 0.32.7
Deployed through running custom jar
Centos 8
Connecting to MariaDB 10.3.14

Hi @sushant.naik
Any reason why you’re not using 0.32.9?
What do you mean by “custom jar” - is that your own build? If yes, what changes have you made?
The c3p0, which is the system managing the connections, has a max pool size of 15 connections, so it’s strange to see more than that unless you have multiple database configurations in Metabase pointing to the same MariaDB or if you’re using MariaDB both for metadata and datasource.

Hello @flamber,
There is no reason , any changes made related to that in 0.32.9?
Its not the my build , i mean i am just running the jar.
No currently i have only two connections

  1. For Metadata residing in Application Server (mariadb)
  2. For Data source residing in database server (mariadb).

@sushant.naik
0.32.9 added the possibility to define maxPoolSize of c3p0.
I think you will be interested in these two issues - and upvote and subscribe to notifications:
https://github.com/metabase/metabase/issues/8679
https://github.com/metabase/metabase/issues/2172
You don’t have two connections, you have up to 15 connections for each database. As you can see from the Time column, the different connections are being used actively between 73 seconds and 7180 seconds ago (probably most of them during sync/scan process).

@flamber

Thanks for the information. Will soon upgrade to latest version (0.32.9).

@flamber
Just for an understanding … What does this C3P0?

@sushant.naik It’s the connection layer for the JDBC drivers - you can read more about in on the project site: https://www.mchange.com/projects/c3p0/

@flamber

Thanks for the info.