Re: Netstat - Lots of PG Connections

From: Lonni J Friedman <netllama(at)gmail(dot)com>
To: CSN <cool_screen_name90001(at)yahoo(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Netstat - Lots of PG Connections
Date: 2005-02-08 22:17:11
Message-ID: 7c1574a9050208141722a2ebe2@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, 8 Feb 2005 13:44:48 -0800 (PST), CSN
<cool_screen_name90001(at)yahoo(dot)com> wrote:
>
> --- Lonni J Friedman <netllama(at)gmail(dot)com> wrote:
>
> > On Tue, 8 Feb 2005 13:17:38 -0800 (PST), CSN
> > <cool_screen_name90001(at)yahoo(dot)com> wrote:
> > > Is this anything to worry about? Why are there so
> > many
> > > Postgresql connections? 'ps axu' usually only
> > shows
> > > about 5-10 postgres processes.
> > >
> > > # netstat
> > > tcp 0 0 localhost.localdo:55547
> > > localhost.loca:postgres TIME_WAIT
> > > tcp 0 0 localhost.localdo:55780
> > > localhost.loca:postgres ESTABLISHED
> > > tcp 0 0 localhost.localdo:55777
> > > localhost.loca:postgres ESTABLISHED
> > > tcp 0 0 localhost.localdo:55778
> > > localhost.loca:postgres ESTABLISHED
> > > tcp 0 0 localhost.localdo:55779
> > > localhost.loca:postgres ESTABLISHED
> > > tcp 0 0 localhost.localdo:55764
> > > localhost.loca:postgres TIME_WAIT
> > > tcp 0 0 localhost.localdo:55760
> > > localhost.loca:postgres TIME_WAIT
> > > tcp 0 0 localhost.localdo:55566
> > > localhost.loca:postgres TIME_WAIT
> > > tcp 0 0 localhost.localdo:55567
> > > localhost.loca:postgres TIME_WAIT
> > > tcp 0 0 localhost.localdo:55562
> > > localhost.loca:postgres TIME_WAIT
> > > tcp 0 0 localhost.localdo:55567
> > > localhost.loca:postgres TIME_WAIT
> > > tcp 0 0 localhost.localdo:55562
> > > localhost.loca:postgres TIME_WAIT
> > > tcp 0 0 localhost.localdo:55563
> > > localhost.loca:postgres TIME_WAIT
> > > tcp 0 0 localhost.loca:postgres
> > > localhost.localdo:55780 ESTABLISHED
> > > tcp 47 0 localhost.loca:postgres
> > > localhost.localdo:55783 ESTABLISHED
> > > tcp 42 0 localhost.loca:postgres
> > > localhost.localdo:55782 ESTABLISHED
> > > tcp 0 0 localhost.loca:postgres
> > > localhost.localdo:55777 ESTABLISHED
> > > tcp 0 0 localhost.loca:postgres
> > > localhost.localdo:55779 ESTABLISHED
> > > tcp 31 0 localhost.loca:postgres
> > > localhost.localdo:55785 ESTABLISHED
> > > tcp 47 0 localhost.loca:postgres
> > > localhost.localdo:55784 ESTABLISHED
> > >
> >
> > The vast majority of these are in a TIME_WAIT state,
> > where the socket
> > is waiting after close to handle packets still in
> > the network. What
> > do you have accessing this DB?
>
> It's a web server (Apache and PHP).
>

OK, then that looks fairly normal assuming that you have a decent
amount of traffic.

--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
L. Friedman netllama(at)gmail(dot)com
LlamaLand http://netllama.linux-sxs.org

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Mike Rylander 2005-02-08 22:58:24 Re: What talk would get you to go to OSCon?
Previous Message Vitaly Belman 2005-02-08 22:16:32 PL/pgSQL bug: FOUND variable is not updated correct with EXECUTE