Unable to adjust connection pool properties
Closed this issue · 1 comments
Setting database pool properties (such as maximumPoolSize, connectionTimeout) has no effect when image-service is running outside of the Grails dev environment.
This appears to be caused by re-ordering of the Spring bean creation for adding Flyway db migrations. By making the dataSource
bean creation depend on flyway and having flyway ensure it goes early in the creation process meant that some Grails magic wasn't applied to the Environment and attempting to retrieve the dataSource.properties
configuration key as a Map
returned null
instead of a map of the values in the configuration file.
To fix, I'll add a separate dataSource for flyway (which IMHO is best practice anyway since it will allow the regular db user to run with fewer privileges).