diff --git a/helm/templates/query-service-config.yaml b/helm/templates/query-service-config.yaml index 5c72ef25..dff95b53 100644 --- a/helm/templates/query-service-config.yaml +++ b/helm/templates/query-service-config.yaml @@ -26,7 +26,8 @@ data: type = postgres connectionString = "{{ .Values.queryServiceConfig.data.postgresConnectionString }}" user = "{{ .Values.queryServiceConfig.data.postgresUser }}" - maxConnections = "{{ .Values.queryServiceConfig.data.postgresMaxConnections }}" + maxConnectionAttempts = "{{ .Values.queryServiceConfig.data.postgresMaxConnectionAttempts }}" + connectionRetryBackoff = "{{ .Values.queryServiceConfig.data.postgresConnectionRetryBackoff }}" } ] {{- if or .Values.handlers .Values.extraHandlers }} diff --git a/helm/values.yaml b/helm/values.yaml index 9505f8de..653b470f 100644 --- a/helm/values.yaml +++ b/helm/values.yaml @@ -68,7 +68,8 @@ queryServiceConfig: zookeeperConnectionString: zookeeper:2181/pinot/my-views postgresConnectionString: jdbc:postgresql://postgres:5432/postgres postgresUser: postgres - postgresMaxConnections: 5 + postgresMaxConnectionAttempts: 200 + postgresConnectionRetryBackoff: 5s tenantColumnName: tenant_id attributeClient: host: attribute-service diff --git a/query-service/src/integrationTest/java/org/hypertrace/core/query/service/htqueries/HTPinotQueriesTest.java b/query-service/src/integrationTest/java/org/hypertrace/core/query/service/htqueries/HTPinotQueriesTest.java index c257044c..557902a3 100644 --- a/query-service/src/integrationTest/java/org/hypertrace/core/query/service/htqueries/HTPinotQueriesTest.java +++ b/query-service/src/integrationTest/java/org/hypertrace/core/query/service/htqueries/HTPinotQueriesTest.java @@ -207,12 +207,12 @@ private static boolean bootstrapConfig() throws Exception { .collect(Collectors.toList()) .size() == 0 - && retry++ < 5) { + && retry++ < 10) { Thread.sleep(2000); } channel.shutdown(); bootstrapper.stop(); - return retry < 5; + return retry < 10; } private static boolean generateData() throws Exception {