Skip to content

Commit

Permalink
Disable postgres SSL to fix random query timeout (#9144)
Browse files Browse the repository at this point in the history
- 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 <[email protected]>
  • Loading branch information
xin-hedera authored Aug 28, 2024
1 parent e81de61 commit a56eae8
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 5 deletions.
4 changes: 4 additions & 0 deletions charts/hedera-mirror-common/templates/test-rest-java.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
4 changes: 4 additions & 0 deletions charts/hedera-mirror-common/templates/test-rest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
4 changes: 4 additions & 0 deletions charts/hedera-mirror-common/templates/test-web3.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand All @@ -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:
Expand All @@ -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 }}
Expand Down
10 changes: 7 additions & 3 deletions charts/hedera-mirror/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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
Expand Down Expand Up @@ -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"
Expand All @@ -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
Expand Down

0 comments on commit a56eae8

Please sign in to comment.