From 601439a395ee83b9ae360589762b12f6a4729f43 Mon Sep 17 00:00:00 2001 From: leboiko Date: Mon, 16 Dec 2024 14:29:39 -0300 Subject: [PATCH] increasing pool size --- kube_files/services/graphql/service.yaml | 4 ++-- shared-utils/src/postgres.rs | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/kube_files/services/graphql/service.yaml b/kube_files/services/graphql/service.yaml index 936b3cb..e4e4985 100644 --- a/kube_files/services/graphql/service.yaml +++ b/kube_files/services/graphql/service.yaml @@ -5,9 +5,9 @@ metadata: labels: io.kompose.service: graphql-engine spec: - type: ClusterIP + type: LoadBalancer ports: - - port: 8080 + - port: 8081 targetPort: 8080 protocol: TCP selector: diff --git a/shared-utils/src/postgres.rs b/shared-utils/src/postgres.rs index 9fea349..fde7aa9 100644 --- a/shared-utils/src/postgres.rs +++ b/shared-utils/src/postgres.rs @@ -4,6 +4,7 @@ use sqlx::{postgres::PgPoolOptions, PgPool}; pub async fn connect_to_db(database_url: &str) -> Result { PgPoolOptions::new() .min_connections(5) + .max_connections(20) .connect(database_url) .await .map_err(|error| LibError::PostgresConnectError(error.to_string()))