Received: from localhost (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 1ECDD6336AD for ; Tue, 7 Apr 2009 12:37:39 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 00135-08 for ; Tue, 7 Apr 2009 12:37:37 -0300 (ADT) Received: from mx1.hub.org (mx1.hub.org [200.46.208.106]) by mail.postgresql.org (Postfix) with ESMTP id 2B4F363322C for ; Tue, 7 Apr 2009 12:37:37 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail.mnc.ch (62-2-77-205.static.cablecom.ch [62.2.77.205]) by mx1.hub.org (Postfix) with ESMTP id DA9051259C82 for ; Tue, 7 Apr 2009 12:37:35 -0300 (ADT) Received: from localhost (mail2.mnc.ch [127.0.0.1]) by mail.mnc.ch (Postfix) with ESMTP id C145123079; Tue, 7 Apr 2009 15:37:30 +0000 (GMT) X-Virus-Scanned: amavisd-new at mnc.ch Received: from mail.mnc.ch ([127.0.0.1]) by localhost (mail2.mnc.ch [127.0.0.1]) (amavisd-new, port 10025) with ESMTP id szljd7o0sBGM; Tue, 7 Apr 2009 15:37:29 +0000 (GMT) Received: from meuh.localdomain (62-2-77-204.static.cablecom.ch [62.2.77.204]) by mail.mnc.ch (Postfix) with ESMTP id D00F323020; Tue, 7 Apr 2009 15:37:29 +0000 (GMT) Received: by meuh.localdomain (Postfix, from userid 1000) id AA963DF2A2; Tue, 7 Apr 2009 17:37:30 +0200 (CEST) To: Krishna Saranathan Cc: pgsql-jdbc@postgresql.org Subject: Re: JAVA-POSTGRESQL connection broken References: <22922667.post@talk.nabble.com> From: Guillaume Cottenceau X-Hashcash: 1:20:090407:krishnapsg_1984@yahoo.co.in::lFLxgqDv8ADTuedX:000000000000000000000000000000000019FM X-Hashcash: 1:20:090407:pgsql-jdbc@postgresql.org::0BioJumu3nYPsN7B:0000000000000000000000000000000000001bkS Date: Tue, 07 Apr 2009 17:37:30 +0200 In-Reply-To: <22922667.post@talk.nabble.com> (Krishna Saranathan's message of "Mon\, 6 Apr 2009 23\:51\:17 -0700 \(PDT\)") Message-ID: <87prfojwzp.fsf@meuh.mnc.lan> User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200904/23 X-Sequence-Number: 19470 Krishna Saranathan 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