Re: Connections closing due to "terminating connection due to administrator command"

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Herouth Maoz <herouth(at)unicell(dot)co(dot)il>
Cc: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Connections closing due to "terminating connection due to administrator command"
Date: 2015-07-27 15:20:49
Message-ID: 26736.1438010449@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Herouth Maoz <herouth(at)unicell(dot)co(dot)il> writes:
> So Im left with the question of what caused the shutdown on July 21st.

Well, you had

2015-07-21 15:37:59 IDT LOG: received fast shutdown request

There is exactly one place in the Postgres code that prints that message,
and it is the postmaster's SIGINT handler.

2015-07-21 15:37:59 IDT LOG: aborting any active transactions

This is just the postmaster noting that it's about to send SIGTERM signals
to all its child processes ...

2015-07-21 15:37:59 IDT FATAL: terminating connection due to administrator command

... and here is a child acknowledging receipt of SIGTERM. This is all
as-expected once the postmaster's received a shutdown signal.

So something sent the postmaster a SIGINT, and it's hard to believe that
the source wasn't external to the database. If your application is
running on a different machine then it couldn't have been the
application's fault. If you didn't issue "pg_ctl stop -m fast" then
we can eliminate that. There has to have been some other software
on the database server machine that sent the signal, and it had to have
privileges to do so which means it was either running as the postgres
O/S user or as root.

One thing worth considering is the possibility that the postmaster had
been started in such a way that it was still associated with a controlling
terminal; then any control-C typed on that terminal would have resulted in
a SIGINT.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Melvin Davidson 2015-07-27 15:23:23 Re: Delete rule does not prevent truncate
Previous Message Herouth Maoz 2015-07-27 15:07:40 Re: Connections closing due to "terminating connection due to administrator command"