Closed wolacinio closed 10 months ago
@wolacinio have you figured out what was the cause of the issue ? I'm experiencing a similar problem.
@gobadiah it seems to me the main problem was in Kubernetes API or Kubernetes Proxy. I reinstalled Kubernetes.
@wolacinio The operator creates a service for you. You don't have to do it yourself. Would be interesting to know, which resources you have defined in the postgres manifest. Maybe it's not enough. Have you tried using the logical backup feature, yet? I would not dump on the instance itself.
@FxKu I know that. Logical backup run only docker image, execute backup and stops. It works this same as run psql local. I think that it doesn't matter how connecting with PostgreSQL service.
/usr/pgsql-11/bin/psql -d sample -h 10.132.54.131 -p 30010 -U postgres -f dump.sql
My way works fine in another clients.
Postgres-manifets.yml:
apiVersion: "acid.zalan.do/v1"
kind: postgresql
metadata:
name: czk-postgres
spec:
dockerImage: registry.opensource.zalan.do/acid/spilo-cdp-12:1.6-p16
teamId: "czk"
volume:
size: 10Gi
storageClass: gluster-heketi-external
numberOfInstances: 1
users: {} # Application/Robot users
enableMasterLoadBalancer: false
enableReplicaLoadBalancer: false
allowedSourceRanges: # load balancers' source ranges for both master and replica services
- 127.0.0.1/32
databases: {}
podAnnotations: {}
# Expert section
enableShmVolume: true
# spiloFSGroup: 103
postgresql:
version: "11"
parameters:
max_connections: "100"
resources:
requests:
cpu: 10m
memory: 200Mi
limits:
cpu: 500m
memory: 500Mi
patroni:
initdb:
encoding: "UTF8"
locale: "en_US.UTF-8"
data-checksums: "true"
pg_hba:
- hostssl all all 0.0.0.0/0 trust
- host all all 0.0.0.0/0 trust
# slots:
# - permanent_physical_1:
# type: physical
# - permanent_logical_1:
# type: logical
# database: foo
# plugin: pgoutput
ttl: 30
loop_wait: &loop_wait 5
retry_timeout: 10
maximum_lag_on_failover: 33554432
Hi @FxKu just noticed these warnings in my app's log too for the first time - not sure if it has happened before. I have set limits to 1 core and 1GB, and there is very little activity (just me since I haven't launched my app yet). Could it happen because when I deploy the workers the previous workers get terminated? Or is it something in Postgres itself, not related to the app that uses it? Thanks!
This issue is still open hence writing it Even after providing enough memory and CPU still Running pod failed and the last logs is:
For 1 hours its working and after some time its went to failed state.
2022-07-27 16:25:36,747 INFO: Lock owner: None; I am smsc-cluster-0 2022-07-27 16:25:36,748 INFO: starting as a secondary 2022-07-27 16:25:37,170 INFO: postmaster pid=13271 /var/run/postgresql:5432 - no response 2022-07-27 16:25:37 UTC [13271]: [1-1] 62e16701.33d7 0 LOG: Auto detecting pg_stat_kcache.linux_hz parameter... 2022-07-27 16:25:37 UTC [13271]: [2-1] 62e16701.33d7 0 LOG: pg_stat_kcache.linux_hz is set to 1000000 2022-07-27 16:25:37 UTC [13271]: [3-1] 62e16701.33d7 0 LOG: redirecting log output to logging collector process 2022-07-27 16:25:37 UTC [13271]: [4-1] 62e16701.33d7 0 HINT: Future log output will appear in directory "../pg_log". 2022-07-27 16:25:38,230 ERROR: postmaster is not running
Same here. Just created the operator and simple minimal cluster by the Readme. The use case I am testing is uploading a 50M binary file to a dummy table. That is, I connect to the postgres service (type: LoadBalancer), create a table with one columnd of type bytea and then I try to uplaod that file. But some seconds later, I get:
SSL SYSCALL error: EOF detected The connection to the server was lost. Attempting reset: Failed.
Please increase the resources limit and request in postgresql manifest file
@Deepanshudang Increasing the resource helped, but it took me a while to find the right settings. Any documentation on this, how to set the value? We have the case that we also store binary files of varying sizes and I have absolutely no idea if this could happen again with bigger files. And simply saying take what you get from the node is not applicable.
Whenever one enters the postgresql and patroni manifest sections overriding config parameters you have to know what you're doing. We are not guaranteeing that the system will run properly with your custom settings. Maybe it was even wrong to enable these config means after all :smiley: . On the other hand people are often hesitant patching Spilo to their own needs.
I have two instance PostgreSQL Cluster. I created service in Kubernetes to connect with PostgreSQL master instance. I run this command on the master node machine:
/usr/pgsql-11/bin/psql -d sample -h 10.132.54.131 -p 30010 -U postgres -f dump.sql
and i received:kubectl logs -f postgres-0
- logs masterSometimes dump was interrupted earlier or later.
I introduced more memory but it still doesn't work: