Re: PostgreSQL Connections?

From: Ashish Karalkar <ashish_karalkar(at)yahoo(dot)com>
To: Shane Ambler <pgsql(at)007Marketing(dot)com>
Cc: Shoaib Mir <shoaibmir(at)gmail(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: PostgreSQL Connections?
Date: 2007-01-13 09:08:23
Message-ID: 951819.29890.qm@web31612.mail.mud.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Thanks Shane for your replay,
It was by mistake , I have multiple clients,my server
IP is 155, having a web server, what we are doing is
using a java pool. and yes we are following the method
to close the connection immediatly after its work and
for next work pick up the new connection from pool, we
are using jboss as web application server. Point of
worry is that my server has many idle process on its
own IP .

With regards
Ashish Karalkar

--- Shane Ambler <pgsql(at)007Marketing(dot)com> wrote:

> Ashish Karalkar wrote:
> > Hi Shoaib
> >
> > Following is the output for ps auxwww | grep
> ^postgres
> >
> > IP address of my server is 172.18.5.155
>
> > postgres 12846 0.0 0.8 45328 4164 ? Ss
> > Jan12 0:00 postgres: qsweb qsweb06jan07
> > 172.18.4.61(4272) idle
>
> > postgres 23335 0.0 0.9 45336 4800 ? Ss
> > 11:38 0:00 postgres: qsweb postgres
> > 172.18.4.16(1313) idle
>
> > postgres 23665 0.0 0.8 45204 4260 ? Ss
> > 12:13 0:00 postgres: qsweb qsweb12jan2007
> > 172.18.5.197(4799) idle
>
> > postgres 23753 0.0 1.0 45336 5216 ? Ss
> > 12:18 0:00 postgres: qsweb postgres
> > 172.18.4.58(1140) idle
>
> > postgres 23761 0.0 1.0 45336 5216 ? Ss
> > 12:20 0:00 postgres: qsweb postgres
> > 172.18.4.135(1214) idle
>
> > postgres 23868 0.0 0.8 45204 4260 ? Ss
> > 12:30 0:00 postgres: qsweb qsweb12jan2007
> > 172.18.5.155(37415) idle
>
> Will probably need a bit more information here but
> what I can figure is-
>
> You say you have a server and a single client -
> there are at least 6
> different ip addresses in the process list you sent.
>
> With the multiple client connections from other
> machines - one is
> obviously the ip address that you know you are
> using, can you account
> for the others?
> If not then you should be fixing your security
> settings - either in your
> pg_hba.conf or a firewall on the server.
>
> From the multiple connections from your server IP I
> would guess that
> you are running a web server and using persistent
> connections of some
> sort. This will keep each connection open so the
> next page request
> doesn't have the overhead of establishing a new
> connection. The ones
> that say idle in transaction would be linked to a
> page being
> constructed. The idle ones will be waiting for the
> next page request.
> This is not a bad thing, although some methods of
> achieving this are
> better than others.
>
> What client software are you using on your client
> machine?
>
> Does this program exit normally or is it crashing
> before it closes the
> connection it has established?
>
> Does the one program open more than one connection
> when it is running?
>
> Was this list taken while the client program was
> running?
>
>
> >
> > --- Shoaib Mir <shoaibmir(at)gmail(dot)com> wrote:
> >
> >> Can you show us the output for:
> >>
> >> ps auxwww | grep ^postgres
> >>
> >> that should explain a little more...
> >>
> >> -------------
> >> Shoaib Mir
> >> EnterpriseDB (www.enterprisedb.com)
> >>
> >> On 1/10/07, Ashish Karalkar
> >> <ashish_karalkar(at)yahoo(dot)com> wrote:
> >>> Hello All,
> >>> I am running PostgresSQL 8.2 on Redhat Linux 4.
> >>> When I look for the processes that are using
> >> postgres
> >>> using ps aux|more
> >>> I got lots of Idle processes with servers own IP
> >>> address. Can anybody please tell me why this is
> >>> happening.
> >>>
> >>> Also there are multiple processes for my single
> >>> client(same IP) of which maximum are idle. are
> >> these
> >>> processes means connection or there is a single
> >>> connection starting many processes.
> >>>
>
> --
>
> Shane Ambler
> pgSQL(at)007Marketing(dot)com
>
> Get Sheeky @ http://Sheeky.Biz
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 4: Have you searched our list archives?
>
> http://archives.postgresql.org/
>


____________________________________________________________________________________
Don't get soaked. Take a quick peak at the forecast
with the Yahoo! Search weather shortcut.
http://tools.search.yahoo.com/shortcuts/#loc_weather

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Shane Ambler 2007-01-13 09:34:18 Re: PostgreSQL Connections?
Previous Message Philippe Lang 2007-01-13 08:43:16 XEON familiy 5000, 5100 or 5300?