pgbouncer error: client disconnect before everything was sent to the server
search cancel

pgbouncer error: client disconnect before everything was sent to the server

book

Article ID: 296873

calendar_today

Updated On:

Products

VMware Tanzu Greenplum

Issue/Introduction

The loading job fails and the following is reported in the pgbouncer log file:
2023-03-20 01:26:05.797 EDT [304166] LOG S-0x15896e0: prod/gpadmin@127.0.0.1:5311 closing because: client disconnect before everything was sent to the server (age=99s)
2023-03-20 01:26:05.797 EDT [304166] LOG C-0x1592c40: prod/load_batch@10.1.1.6:38746 closing because: pgbouncer cannot connect to server (age=0s)


Environment

Product Version: 6.23

Resolution

This is expected behaviour under certain circumstances

From a github commit:
The message "unclean server" is logged if the client connection is
closed while the server is not in "ready" state.  That can be if the
server is in a transaction block, because then we can't reset the
server to non-transaction state other than by closing it.  So this
message can happen in relatively normal use, and it's pretty unclear
and a bit scary.  So this change attempts to make the message a bit
more precise and document, at least in the code, what it means.
source: https://github.com/pgbouncer/pgbouncer/commit/360eb42a4f6e83c907a36f7978e88676ab7584cd

Error can be an indication of the client closing the connection early or a network issue between the client and pgbouncer.