improvement: limit db connection max lifetime

This commit is contained in:
Greg Heartsfield
2022-12-17 10:47:35 -06:00
parent 1b2c6f9fca
commit b6e33f044f
2 changed files with 2 additions and 1 deletions
+1
View File
@@ -76,6 +76,7 @@ pub fn build_pool(
.test_on_check_out(true) // no noticeable performance hit
.min_idle(Some(min_size))
.max_size(max_size)
.max_lifetime(Some(Duration::from_secs(60)))
.build(manager)
.unwrap();
info!(