Re: Erro conection close

From: Juan José Santamaría Flecha <juanjo(dot)santamaria(at)gmail(dot)com>
To: Manuel Garcia <garcia(dot)manuel1987(at)gmail(dot)com>
Cc: postgres admin <pgsql-admin(at)postgresql(dot)org>, pgsql-pt-geral(at)lists(dot)postgresql(dot)org
Subject: Re: Erro conection close
Date: 2019-10-11 05:34:25
Message-ID: CAC+AXB1T-fJ3ShiYSGMpBKmk9=5F9Ym_7ysX7S2e2MwHSYwpNg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin pgsql-pt-geral

On Thu, Oct 10, 2019 at 6:09 PM Manuel Garcia
<garcia(dot)manuel1987(at)gmail(dot)com> wrote:
>
> Boa tarde, gostaria de saber que erro estou tendo, tenho dois servidores um master um slave , com as mesmas configurações.
>
> A aplicação que conecta recebe em média 200 consultas slave e 200 insert master por segundo.
>
> Mas só em um serviço o slave cancela e fecha. A conexão.
>
> Já pensei em fazer um delay na replicação mas interferia nas requisições em tempo real.
>
> DBD::Pg::st execute failed: ERROR: canceling statement due to conflict with recovery
> DETAIL: User query might have needed to see row versions that must be removed.
>
> DBD::Pg::st execute failed: server closed the connection unexpectedly
>
> DBD::Pg::st execute failed: no connection to the server at
>
>
> Se alguém já tive algum erro similar gostaria de alguma orientação.
>
> Desde já agradeço o seu tempo

The portuguese mailing list is pgsql-pt-geral, already in CC, so
please allow me to reply in english.

It looks like you are having problems with the parameter
'max_standby_archive_delay', as described in [1]:

max_standby_archive_delay: "When Hot Standby is active, this parameter
determines how long the standby server should wait before canceling
standby queries that conflict with about-to-be-applied WAL entries,
[...]. The default is 30 seconds."

More on the matter is also in [2].

Regards,

Juan José Santamaría Flecha

[1] https://www.postgresql.org/docs/current/runtime-config-replication.html
[2] https://www.postgresql.org/docs/current/hot-standby.html#HOT-STANDBY-CONFLICT

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Albert Shih 2019-10-11 14:38:41 Strange behavior over WAN
Previous Message Deepak Pahuja . 2019-10-11 04:27:03 Re: how to call a stored function on conflict

Browse pgsql-pt-geral by date

  From Date Subject
Next Message Fabrízio de Royes Mello 2019-10-14 19:30:53 Live Comunidade Brasileira de PostgreSQL
Previous Message Manuel Garcia 2019-10-10 16:09:23 Erro conection close