FTA7700 commited on
Commit
d0de779
·
1 Parent(s): 0661d90

Add DB connection host/port debug log; lower max_connections to 20

Browse files
Files changed (1) hide show
  1. api/src/main.rs +7 -1
api/src/main.rs CHANGED
@@ -114,8 +114,14 @@ async fn main() {
114
  .parse::<sqlx::postgres::PgConnectOptions>()
115
  .expect("invalid DATABASE_URL");
116
 
 
 
 
 
 
 
117
  let pool = sqlx::postgres::PgPoolOptions::new()
118
- .max_connections(32)
119
  .min_connections(4)
120
  .acquire_timeout(Duration::from_secs(5))
121
  .idle_timeout(Duration::from_secs(300))
 
114
  .parse::<sqlx::postgres::PgConnectOptions>()
115
  .expect("invalid DATABASE_URL");
116
 
117
+ tracing::info!(
118
+ host = pg_opts.get_host(),
119
+ port = pg_opts.get_port(),
120
+ "connecting to database"
121
+ );
122
+
123
  let pool = sqlx::postgres::PgPoolOptions::new()
124
+ .max_connections(20)
125
  .min_connections(4)
126
  .acquire_timeout(Duration::from_secs(5))
127
  .idle_timeout(Duration::from_secs(300))