Re: JAVA-POSTGRESQL connection broken

From: Guillaume Cottenceau <gc(at)mnc(dot)ch>
To: Krishna Saranathan <krishnapsg_1984(at)yahoo(dot)co(dot)in>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: JAVA-POSTGRESQL connection broken
Date: 2009-04-07 15:37:30
Message-ID: 87prfojwzp.fsf@meuh.mnc.lan
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Krishna Saranathan <krishnapsg_1984 'at' yahoo.co.in> writes:

> Hi ,
>
> We have a issue here wherein, we are trying to connect postgresql db (7.2)
> and perform batch insert and delete, for configurable number of db records.
> We are using addBatch of statement class of JDBC, to perform this.
>
> Number of records to be deleted is configurable and typically 5000.
>
> We are often getting this error and the java program is exiting before
> receiving the result from postgres.
> In postgres log, i could see the query sent by java program is getting
> executed. Can someone help in pointing out the issue here?
>
> PROGRAM ERROR:
> LOG: unexpected EOF on client connection
>
> LOG: unexpected EOF on client connection
>
> LOG: could not send data to client: Broken pipe

"unexpected EOF on client connection" is typical of a java
program exiting without closing the connection. are you sure
you're not having java exceptions terminating your program? you
might experience an OOM in java because of your usage pattern,
for example.

anyway, 7.2 is veeery outdated so you might be also hitting some
bug somewhere already fixed long ago. you should try using a more
recent version of pg at least in a test environment and check if
the problem also arises there.

--
Guillaume Cottenceau

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message John Lister 2009-04-07 21:03:09 Re: Array passing
Previous Message Dave Cramer 2009-04-07 15:17:27 Re: Array passing