pgsync icon indicating copy to clipboard operation
pgsync copied to clipboard

SSL error

Open Role911 opened this issue 3 years ago • 6 comments

PGSync version: 2.3.2

Postgres version: 13

Elasticsearch version: 7.5

Python version: 3.9

Problem Description: Our pgsync is running on vm, that is connected on our Postgres (cloud). Our vm is stable, but we have problem with Postgres, cpu is on 100 %, after some time, the db is down. We changed our flags : tcp_keepalives_count 100, tcp_keepalives_interval 200 tcp_keepalives_idle 200 , that is suggested in earlier issues. Initial sync is always stable, but after some time we have problem with postgres. Also all indices are there.

PGsync config: POLL_TIMEOUT=1.0 ELASTICSEARCH_CHUNK_SIZE=100 ELASTICSEARCH_MAX_CHUNK_BYTES=1242880 ELASTICSEARCH_MAX_RETRIES=8 ELASTICSEARCH_QUEUE_SIZE=1 ELASTICSEARCH_THREAD_COUNT=1 ELASTICSEARCH_TIMEOUT=180 QUERY_CHUNK_SIZE=100 CONSOLE_LOGGING_HANDLER_MIN_LEVEL=ERROR REPLICATION_SLOT_CLEANUP_INTERVAL=30.0

Postgres: vCPUs: 1 Memory: 3.75 GB SSD storage: 25 GB

Role911 avatar Oct 13 '22 08:10 Role911

  • Any indication in the logs on what caused the db to go down?
  • Could this be related to storage ?
  • Also is PGSync running on the db server?
  • I would check the Postgres and server logs to see what happened during this period first.

toluaina avatar Oct 18 '22 18:10 toluaina

Hello, all resources on db is ok. (cpu, memory and storege). Also all indices exists. After some time resource usage is climbing but not over the limits. The db log is this: server process (PID 60605) was terminated by signal 9: Killed this is query (i can't copy all): SELECT count(*) AS count_1 FROM public.visit AS visit_1 LEFT OUTER JOIN LATERAL (SELECT CAST(JSON_BUILD_OBJECT('mission', CAST(JSON_BUILD_OBJECT('id', JSON_BUILD_ARRAY(mission_1.id)) AS JSONB)) AS JSONB) || CAST(JSON_BUILD_ARRAY(anon_2._keys) AS JSONB) || CAST(JSON_BUILD_ARRAY(anon_3._keys) AS JSONB) AS _keys, CAST(JSON_BUILD_OBJECT('id', mission_1.id, 'startDate', mission_1."startDate", 'endDate', mission_1."endDate", 'type', mission_1.type, 'serviceId', mission_1."serviceId", 'deletedAt', mission_1."deletedAt", 'service', anon_2.service, 'poa', anon_3.poa) AS JSONB) AS mission, mission_1.id AS id FROM public.mission AS mission_1 LEFT OUTER JOIN LATERAL (SELECT CAST(JSON_BUILD_OBJECT('service', CAST(JSON_BUILD_OBJECT('id', service_1.id) AS JSONB)) AS JSONB) || CAST(JSON_BUILD_ARRAY(anon_4._keys) AS JSONB) || CAST(JSON_BUILD_ARRAY(anon_5._keys) AS JSONB) AS keys, CAST(JSON_BUILD_OBJECT('id', service_1.id, 'createdAt', service_1."createdAt", 'name', service_1.name, 'client', anon_4.client, 'process', anon

Pgsync is running as vm that is connected with db. We have master/replication db. We run this on google cloud platform.

Role911 avatar Nov 22 '22 08:11 Role911

db_1 pgsync log_db

Role911 avatar Nov 22 '22 12:11 Role911

Can you please try off the latest main branch. I feel this has now been addressed.

toluaina avatar Dec 12 '22 22:12 toluaina

I try your last version, but i have the same problem. We have project that is currently in production, can we have some skype call, or other channel of communication ?

Role911 avatar Feb 08 '23 11:02 Role911

Can you please connect with me on discord? My user id is taina#4505

@Role911

toluaina avatar Feb 08 '23 21:02 toluaina