From 3b3ebdd572042ab046c56a262f23e0fbe3500feb Mon Sep 17 00:00:00 2001 From: Xin Li <59580070+xin-hedera@users.noreply.github.com> Date: Wed, 28 Aug 2024 10:24:51 -0500 Subject: [PATCH] Disable postgres SSL to fix random query timeout (#9144) - Disable SSL - Enable postgres-util container - Reduce postgresql work_mem to 24MB to lower memory pressue - Add TEST_REPORTS_DIR env variable to all testkube tests Signed-off-by: Xin Li --- .../hedera-mirror-common/templates/test-rest-java.yaml | 4 ++++ charts/hedera-mirror-common/templates/test-rest.yaml | 4 ++++ charts/hedera-mirror-common/templates/test-web3.yaml | 4 ++++ .../templates/stackgres/stackgres-cluster.yaml | 6 ++++-- charts/hedera-mirror/values.yaml | 10 +++++++--- 5 files changed, 23 insertions(+), 5 deletions(-) diff --git a/charts/hedera-mirror-common/templates/test-rest-java.yaml b/charts/hedera-mirror-common/templates/test-rest-java.yaml index 197494421cb..b8d066521ed 100644 --- a/charts/hedera-mirror-common/templates/test-rest-java.yaml +++ b/charts/hedera-mirror-common/templates/test-rest-java.yaml @@ -31,6 +31,10 @@ spec: name: BASE_URL type: basic value: http://{{ $target.release }}-restjava.{{ $target.namespace }}.svc.cluster.local + TEST_REPORTS_DIR: + name: TEST_REPORTS_DIR + type: basic + value: /share type: k6-custom/script {{- end}} {{- end }} diff --git a/charts/hedera-mirror-common/templates/test-rest.yaml b/charts/hedera-mirror-common/templates/test-rest.yaml index d04935a0784..32e4fcfa63a 100644 --- a/charts/hedera-mirror-common/templates/test-rest.yaml +++ b/charts/hedera-mirror-common/templates/test-rest.yaml @@ -31,6 +31,10 @@ spec: name: BASE_URL type: basic value: http://{{ $target.release }}-rest.{{ $target.namespace }}.svc.cluster.local + TEST_REPORTS_DIR: + name: TEST_REPORTS_DIR + type: basic + value: /share type: k6-custom/script {{- end }} {{- end }} diff --git a/charts/hedera-mirror-common/templates/test-web3.yaml b/charts/hedera-mirror-common/templates/test-web3.yaml index cf6275ad618..6caf6e5f076 100644 --- a/charts/hedera-mirror-common/templates/test-web3.yaml +++ b/charts/hedera-mirror-common/templates/test-web3.yaml @@ -31,6 +31,10 @@ spec: name: BASE_URL type: basic value: http://{{ $target.release }}-web3.{{ $target.namespace }}.svc.cluster.local + TEST_REPORTS_DIR: + name: TEST_REPORTS_DIR + type: basic + value: /share type: k6-custom/script {{- end }} {{- end }} diff --git a/charts/hedera-mirror/templates/stackgres/stackgres-cluster.yaml b/charts/hedera-mirror/templates/stackgres/stackgres-cluster.yaml index 3036b612fdf..155540ebe4b 100644 --- a/charts/hedera-mirror/templates/stackgres/stackgres-cluster.yaml +++ b/charts/hedera-mirror/templates/stackgres/stackgres-cluster.yaml @@ -16,7 +16,7 @@ spec: - sgScript: {{ include "hedera-mirror.stackgres" . }}-coordinator pods: disableMetricsExporter: {{ not .Values.stackgres.coordinator.enableMetricsExporter }} - disablePostgresUtil: true + disablePostgresUtil: {{ not .Values.stackgres.coordinator.enablePostgresUtil }} persistentVolume: {{ .Values.stackgres.coordinator.persistentVolume | toYaml | nindent 8 }} resources: disableResourcesRequestsSplitFromTotal: {{ .Values.stackgres.dedicatedResourcesRequests }} @@ -37,6 +37,8 @@ spec: disableClusterPodAntiAffinity: {{ not .Values.stackgres.podAntiAffinity }} postgres: extensions: {{ .Values.stackgres.extensions | toYaml | nindent 6 }} + ssl: + enabled: false # Disable SSL to work around https://github.com/hashgraph/hedera-mirror-node/issues/9143 version: {{ .Values.stackgres.postgresVersion | quote }} prometheusAutobind: {{ or .Values.stackgres.coordinator.enableMetricsExporter .Values.stackgres.worker.enableMetricsExporter }} replication: @@ -53,7 +55,7 @@ spec: overrides: {{ .Values.stackgres.worker.overrides | toYaml | nindent 6 }} pods: disableMetricsExporter: {{ not .Values.stackgres.coordinator.enableMetricsExporter }} - disablePostgresUtil: true + disablePostgresUtil: {{ not .Values.stackgres.coordinator.enablePostgresUtil }} persistentVolume: {{ .Values.stackgres.worker.persistentVolume | toYaml | nindent 8 }} resources: disableResourcesRequestsSplitFromTotal: {{ .Values.stackgres.dedicatedResourcesRequests }} diff --git a/charts/hedera-mirror/values.yaml b/charts/hedera-mirror/values.yaml index 029a97ab160..ceabdb661f5 100644 --- a/charts/hedera-mirror/values.yaml +++ b/charts/hedera-mirror/values.yaml @@ -277,9 +277,10 @@ stackgres: config: autovacuum_max_workers: "2" checkpoint_timeout: "1800" - citus.executor_slow_start_interval: "20ms" + citus.executor_slow_start_interval: "10ms" citus.max_cached_conns_per_worker: "6" citus.max_shared_pool_size: "850" + citus.node_conninfo: "sslmode=disable" # Disable SSL to work around https://github.com/hashgraph/hedera-mirror-node/issues/9143 full_page_writes: "true" # Required for replication to work in recovery scenarios log_checkpoints: "true" log_timezone: "Etc/UTC" @@ -291,8 +292,9 @@ stackgres: shared_buffers: "9GB" wal_init_zero: "off" # Not needed with ZFS wal_recycle: "off" # Not needed with ZFS - work_mem: "32MB" + work_mem: "24MB" enableMetricsExporter: false + enablePostgresUtil: true instances: 1 replication: mode: sync-all @@ -331,6 +333,7 @@ stackgres: config: autovacuum_max_workers: "2" checkpoint_timeout: "1800" + citus.node_conninfo: "sslmode=disable" # Disable SSL to work around https://github.com/hashgraph/hedera-mirror-node/issues/9143 full_page_writes: "false" # Not required for ZFS and Enabling this causes hash indexes to have spikes in write performance. log_checkpoints: "true" log_timezone: "Etc/UTC" @@ -342,8 +345,9 @@ stackgres: shared_buffers: "9GB" wal_init_zero: "off" # Not needed with ZFS wal_recycle: "off" # Not needed with ZFS - work_mem: "32MB" + work_mem: "24MB" enableMetricsExporter: false + enablePostgresUtil: true instances: 1 overrides: [] # Override shard(s) configuration replicasPerInstance: 1