-
Notifications
You must be signed in to change notification settings - Fork 803
[#10733] fix(core): Correct DBCP2 connection pool settings to avoid cold-start connection overhead #10734
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
[#10733] fix(core): Correct DBCP2 connection pool settings to avoid cold-start connection overhead #10734
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -89,14 +89,14 @@ public void init(Config config) { | |
| config.get(Configs.ENTITY_RELATIONAL_JDBC_BACKEND_WAIT_MILLISECONDS)); | ||
| dataSource.setMaxTotal(config.get(Configs.ENTITY_RELATIONAL_JDBC_BACKEND_MAX_CONNECTIONS)); | ||
| dataSource.setMaxIdle(5); | ||
| dataSource.setMinIdle(0); | ||
| dataSource.setMinIdle(5); | ||
| dataSource.setLogAbandoned(true); | ||
| dataSource.setRemoveAbandonedOnBorrow(true); | ||
| dataSource.setRemoveAbandonedTimeout(60); | ||
| dataSource.setTimeBetweenEvictionRunsMillis(Duration.ofMillis(10 * 60 * 1000L).toMillis()); | ||
| dataSource.setTestOnBorrow(true); | ||
| dataSource.setTestWhileIdle(true); | ||
| dataSource.setMinEvictableIdleTimeMillis(1000); | ||
| dataSource.setMinEvictableIdleTimeMillis(Duration.ofSeconds(30).toMillis()); | ||
|
Comment on lines
90
to
+99
|
||
| dataSource.setNumTestsPerEvictionRun(BaseObjectPoolConfig.DEFAULT_NUM_TESTS_PER_EVICTION_RUN); | ||
| dataSource.setTestOnReturn(BaseObjectPoolConfig.DEFAULT_TEST_ON_RETURN); | ||
| dataSource.setSoftMinEvictableIdleTimeMillis( | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The idle-size value
5is now duplicated betweensetMaxIdle(5)andsetMinIdle(5). Consider defining a single constant (or deriving one from the other) to prevent future mismatches when tuning the pool.