Обсуждение: pg_dump - postgre 9.2 and "server closed the connection unexpectedly"

Поиск
Список
Период
Сортировка

pg_dump - postgre 9.2 and "server closed the connection unexpectedly"

От
Maycon Oliveira
Дата:
Hi there.

i´m using postgre for 2 years now and i started to have this *INTERMITENT*
error from pg_dump:


pg_dump: Dumping the contents of table "adm_log" failed: PQgetCopyData()
failed.
pg_dump: Error message from server: server closed the connection
unexpectedly
    This probably means the server terminated abnormally
    before or while processing the request.
pg_dump: The command was: COPY xcp0000000001.adm_log (seq_log, dth_evento,
des_mensagem, des_usuario, des_objeto) TO stdout;



Looking on the postgre logs i see this error:


LOG:  could not send data to client: Connection timed out
STATEMENT:  COPY xcp0000000001.adm_log (seq_log, dth_evento, des_mensagem,
des_usuario, des_objeto) TO stdout;


Informations:

1 - The database has only 18MB.
2 - The adm_log table has a text field with relative large content (java
stacktraces)
3 - The database has 12 schemas and they are generated by a script that
copies the structure from one and creates another.
4 - I never ran VACUMM ou ANALYSE or REINDEX commands.
5 - The database is using the default configuration (autovaccum on)


Anybody has a hint? I´m afraid that can lead to a bigger problem.




--
View this message in context:
http://postgresql.nabble.com/pg-dump-postgre-9-2-and-server-closed-the-connection-unexpectedly-tp5866825.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.


Re: pg_dump - postgre 9.2 and "server closed the connection unexpectedly"

От
Tom Lane
Дата:
Maycon Oliveira <fuinhaazul@gmail.com> writes:
> i´m using postgre for 2 years now and i started to have this *INTERMITENT*
> error from pg_dump:
> pg_dump: Dumping the contents of table "adm_log" failed: PQgetCopyData()
> failed.
> pg_dump: Error message from server: server closed the connection
> unexpectedly

> Looking on the postgre logs i see this error:
> LOG:  could not send data to client: Connection timed out
> STATEMENT:  COPY xcp0000000001.adm_log (seq_log, dth_evento, des_mensagem,
> des_usuario, des_objeto) TO stdout;

Evidently a connectivity problem, not a database integrity problem.

Is pg_dump running on a different machine than the server?  If so
you could be looking at network hardware issues.

Is pg_dump using an SSL-encrypted connection?  If so maybe it's a
renegotiation problem.  Try setting ssl_renegotiation_limit = 0
in the server's configuration.

            regards, tom lane


Re: pg_dump - postgre 9.2 and "server closed the connection unexpectedly"

От
Maycon Oliveira
Дата:
Thanks for the answer.

The pg_dump is running on the same machine as the database. Is a VPS running
centos.

the script is this one:

https://wiki.postgresql.org/wiki/Automated_Backup_on_Linux

im using the custom backups.





--
View this message in context:
http://postgresql.nabble.com/pg-dump-postgre-9-2-and-server-closed-the-connection-unexpectedly-tp5866825p5866846.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.