We can update below values in server\modules\spatial\pooling-datasource-factory.properties file
# (int) The maximum number of active connections that can be allocated from
# this pool at the same time. The default value is 20
maxActive = 5
# (int) The maximum number of connections that should be kept in the pool at
# all times. Default value is maxActive. Idle connections are checked
# periodically (if enabled) and connections that been idle for longer than
# minEvictableIdleTimeMillis will be released.
maxIdle = 1
# (int) The minimum number of established connections that should be kept in
# the pool at all times. The connection pool can shrink below this number if
# validation queries fail. Default value is 10
minIdle = 1
# (int)The initial number of connections that are created when the pool is
# started. Default value is 10
initialSize = 0
It will restore the database connection without restarting the spectrum service