Skip to content

Commit d636807

Browse files
committed
Hikari: sync number of worker threads with pool size
1 parent fe04448 commit d636807

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

modules/jooby-hikari/src/main/java/io/jooby/hikari/HikariModule.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ public HikariModule(@Nonnull HikariConfig hikari) {
243243
private static Map<String, Object> defaults(String database, Environment env) {
244244
Map<String, Object> defaults = new HashMap<>();
245245
defaults.put("maximumPoolSize",
246-
Math.max(MINIMUM_SIZE, Runtime.getRuntime().availableProcessors() * 2 + 1));
246+
Math.max(MINIMUM_SIZE, Runtime.getRuntime().availableProcessors() * 8));
247247
if ("derby".equals(database)) {
248248
// url => jdbc:derby:${db};create=true
249249
defaults.put("dataSourceClassName", "org.apache.derby.jdbc.ClientDataSource");

0 commit comments

Comments
 (0)