Skip to content

Commit 63d3b30

Browse files
Merge pull request #725 from integer32llc/adjust-db-connections
Adjust db connections
2 parents 71791be + cdf6709 commit 63d3b30

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/app.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,11 @@ impl App {
4949

5050
let db_config = r2d2::Config::builder()
5151
.pool_size(if config.env == ::Env::Production {10} else {1})
52+
.min_idle(if config.env == ::Env::Production {Some(5)} else {None})
5253
.helper_threads(if config.env == ::Env::Production {3} else {1})
5354
.build();
5455
let diesel_db_config = r2d2::Config::builder()
55-
.pool_size(if config.env == ::Env::Production {50} else {1})
56+
.pool_size(if config.env == ::Env::Production {30} else {1})
5657
.min_idle(if config.env == ::Env::Production {Some(5)} else {None})
5758
.helper_threads(if config.env == ::Env::Production {3} else {1})
5859
.build();

0 commit comments

Comments
 (0)