Re: idle in transaction...unexpected EOF on client connection

From: "Scott Marlowe" <scott(dot)marlowe(at)gmail(dot)com>
To: "Tena Sakai" <tsakai(at)gallo(dot)ucsf(dot)edu>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: idle in transaction...unexpected EOF on client connection
Date: 2007-11-09 22:41:34
Message-ID: dcc563d10711091441v24fba20fq275ac75f22f5636e@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On Nov 9, 2007 4:36 PM, Tena Sakai <tsakai(at)gallo(dot)ucsf(dot)edu> wrote:

> Hi Scott,
>
>
> > Most likely what is happening is that you have a firewall between your
> > app and your db server that is closing idle connections after x minutes.
>
> Thanks for your comment.
>
> I hate to be disagreeable, but the app and postgres are running
> on the same computer. The app is a java program using jdbc to
> issue postgres commands. However, I see the same message via
> psql (on the same machine).

Hmmm. Well, when you see an error like unexpected EOF on client
connection then that means that the client "disappeared" without
closing the connection, or the network connection went away. Either
way, the pgsql backend was still alive, and tried to send something to
the client, and the client wasn't there. I.e. the problem isn't
generally a postgresql problem, it's a client problem. So, the more
info about the client app the better chance of fixing it.

Note that if you've got a lot of "idle in transactions" connections,
that's a bad thing because it prevents postgresql from being properly
vacuumed. Most connection managers can be set to NOT issue a begin as
part of a connection reset when returning it to the pool.

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Tom Lane 2007-11-09 23:03:06 Re: idle in transaction...unexpected EOF on client connection
Previous Message Tena Sakai 2007-11-09 22:36:13 Re: idle in transaction...unexpected EOF on client connection