Re: Hung thread

From: Kevin Grittner <kgrittn(at)ymail(dot)com>
To: dhaval jaiswal <dhavallj(at)hotmail(dot)com>, Dave Cramer <pg(at)fastcrypt(dot)com>
Cc: "pgsql-jdbc(at)postgresql(dot)org" <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: Hung thread
Date: 2014-10-31 16:13:59
Message-ID: 1414772039.39592.YahooMailNeo@web122301.mail.ne1.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

dhaval jaiswal <dhavallj(at)hotmail(dot)com> wrote:

> DB end i found below logs, however not sure whether it is
> reflecting for which connection.
>
> could not receive data from client: Connection reset by peer
> unexpected EOF on client connection

This means that from the server perspective the TCP connection from
the client was closed without the client first properly closing it
at the PostgreSQL protocol level (with a Terminate ['X'] message).
It's not impossible that this could be a bug in dbcp, but it seems
more likely that it is a network problem. It could also be caused
by the client software digging down into the guts of the JDBC
implementation and closing the socket used by the driver before
returning the connection to dbcp, but that seems quite unlikely.

All evidence points to the network as the most likely source of the
problem.

Was there an external connection pooler (like pgbouncer or pgpool)?
If such a connection pool process was abruptly killed and then
started back up, that could also explain this. If the pooler was
on a separate machine (or VM) which abruptly disappeared from view,
that would explain the dbcp behavior.

You might want to add more information to the PostgreSQL log line
prefix to be able to better match things up. Be sure you log
connections and disconnections, too.

--
Kevin Grittner
EDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Mikko Tiihonen 2014-11-01 00:34:19 Pull request for better handling of master/slave and load balancing when connecting to multiple hosts
Previous Message Dave Cramer 2014-10-31 09:47:57 Re: Hung thread