pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Francisco Olarte <folarte@peoplecall.com>
Cc: Laurenz Albe <laurenz.albe@cybertec.at>
Cc: Vikas Sharma <shavikas@gmail.com>
Cc: Postgres General <pgsql-general@postgresql.org>
Subject: Re: Multiple postmasters running from same directory
Date: Tue, 13 Feb 2018 12:46:50 -0500
Message-ID: <25529.1518544010@sss.pgh.pa.us> (raw)
In-Reply-To: <CA+bJJbw1gEpy5iFgLmT7GKOURz=jogSe=cQuS6PYBjxCPVHy8g@mail.gmail.com>
References: <CAN6gwKzz8XLQwvs117eXAOWmYxXEOZqdqv-zCaVLTWyyTZMiTQ@mail.gmail.com>
	<1518529333.2525.25.camel@cybertec.at>
	<6540.1518537032@sss.pgh.pa.us>
	<CA+bJJbw1gEpy5iFgLmT7GKOURz=jogSe=cQuS6PYBjxCPVHy8g@mail.gmail.com>

Francisco Olarte <folarte@peoplecall.com> writes:
> On Tue, Feb 13, 2018 at 4:50 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> Putting two and two together, you have some monitoring program that is
>> hitting the postmaster with a constant stream of TCP connection requests
>> none of which get completed, resulting in a whole lot of useless fork
>> activity.  Dial down the monitoring.

> Adding the incomplete startup to the mix, it may be a misconfigured
> monitoring program sending just a byte or two, or zero, and then
> waiting for response, which will give ps more time to catch the child
> in that state. Haven't look at the code, but given messages state with
> 1 identifier byte plus a 4 byte length, many of the forms of reading
> that would lead to a big wait for at least 5 bytes, or for the first
> byte.

Hm, yeah.  From memory, the child process will wait a maximum of 60
seconds to receive a startup packet.  If the hypothesized probing program
sends nothing, or just a small number of bytes, and then sits rather than
closing the connection, then this state would easily persist long enough
to be observable in ps.

If you're not sure where these probes are coming from, turning on
log_connections should help: the "connection received" message comes out
before waiting for the startup packet.

			regards, tom lane




view thread (7+ messages)  latest in thread

Message-ID: <25529.1518544010@sss.pgh.pa.us>
Permalink:  ../25529.1518544010@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/25529.1518544010@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: tgl@sss.pgh.pa.us, folarte@peoplecall.com, laurenz.albe@cybertec.at, shavikas@gmail.com
  Subject: Re: Multiple postmasters running from same directory
  In-Reply-To: <25529.1518544010@sss.pgh.pa.us>
  References: <CAN6gwKzz8XLQwvs117eXAOWmYxXEOZqdqv-zCaVLTWyyTZMiTQ@mail.gmail.com> <1518529333.2525.25.camel@cybertec.at> <6540.1518537032@sss.pgh.pa.us> <CA+bJJbw1gEpy5iFgLmT7GKOURz=jogSe=cQuS6PYBjxCPVHy8g@mail.gmail.com> <25529.1518544010@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox