5 Replies Latest reply on Mar 23, 2017 10:51 AM by mohideen

    Modeshape 5 open database connections

    mohideen

      I have noticed that the database connection threads in the postgres server are never closed. They are in an idle state when there is no active usage. We use Modeshape 5.1.0.Final (Fcrepo 4.7.0) and postgres 9.5.

       

      Here is our persistence configuration:

       

           persistence": {

                  "type" : "db",

                  "connectionUrl": "jdbc:postgresql://server:5432/db",

                  "driver" : "org.postgresql.Driver",

                  "username" : "username",

                  "password" : "password",

                  "poolSize" : 20

              }

       

      The number of open threads is based on the poolSize configuration. When we had 50 as the poolSize we had 50 idle postgres threads and when we lowered it to 20, the idle threads came down to 20. I just want to check if this is how the database connection is supposed to work or if the connections are supposed to be closed after a period of no activity. Also, what would be the recommended value for the poolSize paramater?

       

      Thanks in advance!