On Thu, Oct 10, 2019 at 6:09 PM Manuel Garcia
<garcia.manuel1987@gmail.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