What determines HikariCP pool sizing in JHipster-generated Spring Boot applications?
0 reputation · 22 Mar 2024, 06:10 UTC
Configuration Goal
JHipster generates Spring Boot applications using HikariCP as the default connection pool implementation. The generator's application.yml template includes hikari configuration, but the exact logic for calculating maximumPoolSize may not be fully transparent to developers deploying to production environments.
Relevant Constraints
The default maximum pool size is calculated using the formula (availableProcessors * 2) + availableDiskParallelism, capped at 10. This automatic sizing may be insufficient for production workloads with high concurrent load, potentially leading to connection pool exhaustion. Database-specific connection limits may also conflict with application-level pool settings.
Unresolved Behavior
While JHipster supports custom datasource configuration through application-local.yml for environment-specific overrides, the precise conditions under which the generator applies versus ignores default pool sizing calculations remains unclear. Additionally, version differences in JHipster affect generated configuration structure, making it difficult to predict behavior across different project generations.
Specific Questions
- Does JHipster's generated configuration expose all HikariCP tuning parameters, or are some defaults applied implicitly without clear documentation?
- Under what circumstances does the automatic pool sizing formula produce values that conflict with production database connection limits?