Re: tcp_keepalives_idle ignored

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: henry <henry(at)zen(dot)co(dot)za>
Cc: pgsql-general(at)postgresql(dot)org, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Subject: Re: tcp_keepalives_idle ignored
Date: 2008-01-13 10:49:57
Message-ID: 20080113104957.GA18797@svana.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Sun, Jan 13, 2008 at 08:40:34AM +0200, henry wrote:
> > This is all irrelevant to your real problem, to judge by the rest of
> > the thread, but I'm curious.
>
> I did in fact find a leak in long-lived procs (some of which can run for
> days) - but squashing that did not make my problem go away. In fact,
> these procs are connecting to port TCP 5432 - not a socket
> (/tmp/.s.PGSQL.5432), TCP connections to 5432 come and go nicely in sync
> with the number of active procs.
>
> The number of /tmp/.s.PGSQL.5432 connections just keep growing... I have
> no idea what's causing it.

Do you have any kind of logging? At the very least pg_stat_activity
should tell you if they're doing anything.

> lsof doesn't tell me what's talking to PG through /tmp/.s.PGSQL.5432
> either. Maybe I'm not understanding exactly how /tmp/.s.PGSQL.5432 is
> used - what would connect to PG via a domain socket? procs which don't
> explicitly use -p5432, or some other mechanism which I'm ignorant of?

Maintainence programs? lsof will tell you what's doing it. Try (as
root):

lsof |grep '.s.PGSQL'

That will list a lot of postgres processes, you're looking for the
other ones.

Connecting to unix domain socket happens if you don't specify a host.

Have a nice day,
--
Martijn van Oosterhout <kleptog(at)svana(dot)org> http://svana.org/kleptog/
> Those who make peaceful revolution impossible will make violent revolution inevitable.
> -- John F Kennedy

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tristen Ennemuist 2008-01-13 10:55:08 libpq updateable resultset?
Previous Message Sim Zacks 2008-01-13 08:58:01 Re: 8.2.4 serious slowdown