Обсуждение: Connections refused during backups
After an upgrade from 8.0.8 to 8.1.8, I am getting a number of our scripts failing with 'connection refused' at around 4:00am, which seems to be when the nightly database backup occurs. I am using "/usr/bin/pg_dump -Fc -b -c -C" to do the deed. Has there been a change in behavior, i.e. is the whole databases being exclusively locked or something that would prevent a connection.
Glen Eustace <geustace@godzone.net.nz> writes:
> After an upgrade from 8.0.8 to 8.1.8, I am getting a number of our
> scripts failing with 'connection refused' at around 4:00am, which seems
> to be when the nightly database backup occurs.
"Connection refused" is a kernel-level rejection, and at least in theory
should have nothing to do with what Postgres is doing. Did you do a
kernel update at the same time?
regards, tom lane
Tom Lane wrote:
"Connection refused" is a kernel-level rejection, and at least in theory
should have nothing to do with what Postgres is doing. Did you do a
kernel update at the same time?
regards, tom lane
My apologies, I shouldn't have used the generic socket error 'Connection
refused'. What I am getting are errors like
"Could not connect to database" from libnss-pgsql
Glen Eustace <geustace@godzone.net.nz> writes:
> My apologies, I shouldn't have used the generic socket error 'Connection
> refused'. What I am getting are errors like
> "Could not connect to database" from libnss-pgsql
Please be *exact* rather than handwaving. What is the full text of the
client-side message? What if anything shows up in the postmaster log?
regards, tom lane
Tom Lane wrote: > Glen Eustace <geustace@godzone.net.nz> writes: >> My apologies, I shouldn't have used the generic socket error 'Connection >> refused'. What I am getting are errors like >> "Could not connect to database" from libnss-pgsql > > Please be *exact* rather than handwaving. What is the full text of the > client-side message? What if anything shows up in the postmaster log? > > regards, tom lane This is the exact message from libnss-pgsql, there is currently no timestamp in the log ( which I will fix ), so I cannot place any messages into the correct timeframe. I'll wait until tomorrow morning and see if anything is obvious. The only thing I am aware of is that nss-pgsql uses a 10s connection_timeout, which may be too short when the pgsql server is busy.
Glen Eustace <geustace@godzone.net.nz> writes:
>>> My apologies, I shouldn't have used the generic socket error 'Connection
>>> refused'. What I am getting are errors like
>>> "Could not connect to database" from libnss-pgsql
> This is the exact message from libnss-pgsql,
While you are at it, you should complain to the libnss-pgsql authors
about the inadequacy of the error message. It should at least be
repeating the libpq error message ...
regards, tom lane
Tom Lane wrote: > Glen Eustace <geustace@godzone.net.nz> writes: >>>> My apologies, I shouldn't have used the generic socket error 'Connection >>>> refused'. What I am getting are errors like >>>> "Could not connect to database" from libnss-pgsql > >> This is the exact message from libnss-pgsql, > > While you are at it, you should complain to the libnss-pgsql authors > about the inadequacy of the error message. It should at least be > repeating the libpq error message ... > > regards, tom lane Nothing of interest appears in the postmaster logs so I am broadening my search for general network incidents/activity as opposed to postgresql specific. I have also downloaded the source for libnss-pgsql and will add some extra code to see if I can get any more useful info from it. Thanks for the comments/help to date :-)