diff --git a/module/database/src/main/resources/datasource.yml b/module/database/src/main/resources/datasource.yml index 3da021d75..2916d919b 100644 --- a/module/database/src/main/resources/datasource.yml +++ b/module/database/src/main/resources/datasource.yml @@ -42,6 +42,10 @@ DefaultSettings: # A value of 0 indicates no maximum lifetime (infinite lifetime), subject of course to the idleTimeout setting. # The minimum allowed value is 30000ms (30 seconds). Default: 1800000 (30 minutes) MaxLifetime: 1800000 + # This property controls the keepalive interval for a connection in the pool. An in-use connection will never be + # tested by the keepalive thread, only when it is idle will it be tested. + # keepaliveTimeMs the interval in which connections will be tested for aliveness, thus keeping them alive by the act of checking. Value is in milliseconds, default is 0 (disabled). + KeepaliveTime: 300000 # If your driver supports JDBC4 we strongly recommend not setting this property. # This is for "legacy" drivers that do not support the JDBC4 Connection.isValid() API. # This is the query that will be executed just before a connection is given to you from the pool to validate that the connection to the database is still alive. @@ -64,4 +68,4 @@ DefaultSettings: cachePrepStmts: true # Newer versions of MySQL support server-side prepared statements, this can provide a substantial performance boost. # Set this property to true. - useServerPrepStmts: true \ No newline at end of file + useServerPrepStmts: true