mirror of
https://github.com/fawney19/Aether.git
synced 2026-09-02 01:10:23 +08:00
chore(gateway): 调小 Postgres 连接池默认值
- max_connections 100 → 20 - idle_timeout 60s → 30s - .env.example 补充连接池相关变量注释
This commit is contained in:
@@ -170,7 +170,7 @@ struct GatewayDataArgs {
|
||||
#[arg(
|
||||
long,
|
||||
env = "AETHER_GATEWAY_DATA_POSTGRES_MAX_CONNECTIONS",
|
||||
default_value_t = 100
|
||||
default_value_t = 20
|
||||
)]
|
||||
postgres_max_connections: u32,
|
||||
|
||||
@@ -184,7 +184,7 @@ struct GatewayDataArgs {
|
||||
#[arg(
|
||||
long,
|
||||
env = "AETHER_GATEWAY_DATA_POSTGRES_IDLE_TIMEOUT_MS",
|
||||
default_value_t = 60_000
|
||||
default_value_t = 30_000
|
||||
)]
|
||||
postgres_idle_timeout_ms: u64,
|
||||
|
||||
@@ -1243,9 +1243,9 @@ mod tests {
|
||||
redis_url: None,
|
||||
redis_key_prefix: None,
|
||||
postgres_min_connections: 1,
|
||||
postgres_max_connections: 100,
|
||||
postgres_max_connections: 20,
|
||||
postgres_acquire_timeout_ms: 10_000,
|
||||
postgres_idle_timeout_ms: 60_000,
|
||||
postgres_idle_timeout_ms: 30_000,
|
||||
postgres_max_lifetime_ms: 1_800_000,
|
||||
postgres_statement_cache_capacity: 100,
|
||||
postgres_require_ssl: false,
|
||||
|
||||
Reference in New Issue
Block a user