diff --git a/das_api/src/config.rs b/das_api/src/config.rs index 82542ceec..ae3d6251e 100644 --- a/das_api/src/config.rs +++ b/das_api/src/config.rs @@ -8,6 +8,7 @@ use { pub struct Config { pub database_url: String, pub max_database_connections: Option, + pub max_request_connections: Option, pub metrics_port: Option, pub metrics_host: Option, pub server_port: u16, diff --git a/das_api/src/main.rs b/das_api/src/main.rs index a8105358a..f910cc118 100644 --- a/das_api/src/main.rs +++ b/das_api/src/main.rs @@ -134,6 +134,7 @@ async fn main() -> Result<(), DasApiError> { let server = ServerBuilder::default() .set_middleware(middleware) + .max_connections(config.max_request_connections.unwrap_or(100)) .set_logger(MetricMiddleware) .build(addr) .await?;