Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion workers/server/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,11 @@ pub async fn connect_pool(
Ok(true)
})
})
.idle_timeout(Duration::from_secs(60));
// sqlx closes every connection idle past this, the minimum included,
// and then reconnects to restore the minimum. A short timeout therefore
// costs a TLS handshake and login per warm connection per period while
// nothing is happening. Ten minutes still returns burst capacity.
.idle_timeout(Duration::from_secs(600));
#[cfg(feature = "observability")]
let options = if crate::observability::enabled() {
options.acquire_time_level(log::LevelFilter::Debug)
Expand Down
Loading