Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Unexpected EOF on client connection

101 views
Skip to first unread message

Matthias Brunner

unread,
Aug 14, 2002, 11:02:33 AM8/14/02
to
Hello,

whenever I close a JDBC connection, the following log message is printed:
DEBUG: pq_recvbuf: unexpected EOF on client connection

I searched the archive and found messages about the issue dating back to 20=
01.=20
Since then, this "bug" has not been fixed.
Whereas it does not seem to be a real problem, it is quite irritating=20
especially for new users like me (log messages about errors should only be=
=20
printed when "real" errors occure).

What can be done about this?

Software used: postgresql 7.2, JDBC driver for 7.2, Sun JDK 1.4, Linux
--=20
Matthias Brunner <m...@blumenstrasse.vol.at>
PGP FP 7862 32B3 3B75 292A F76F 5042 8587 21AB 5B89 D501
Check out http://blumenstrasse.vol.at/~mb/gpgkey.asc


---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/users-lounge/docs/faq.html

Barry Lind

unread,
Aug 14, 2002, 12:31:30 PM8/14/02
to
Matthias,

I am not aware of any bug like this. This problem used to exist in the
7.0 drivers but was fixed a long time ago. I certainly don't see this
in my applications. Are you sure you are calling Connection.close()?
If you don't close the connection properly then you will see this
message. If you can reproduce please send a test case to the mail list
and we will look at the problem.

thanks,
--Barry

Matthias Brunner wrote:

>Hello,
>
>whenever I close a JDBC connection, the following log message is printed:
>DEBUG: pq_recvbuf: unexpected EOF on client connection
>

>I searched the archive and found messages about the issue dating back to 2001.

>Since then, this "bug" has not been fixed.
>Whereas it does not seem to be a real problem, it is quite irritating

>especially for new users like me (log messages about errors should only be

>printed when "real" errors occure).
>
>What can be done about this?
>
>Software used: postgresql 7.2, JDBC driver for 7.2, Sun JDK 1.4, Linux
>
>

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to majo...@postgresql.org

Tom Lane

unread,
Aug 14, 2002, 12:36:52 PM8/14/02
to
Matthias Brunner <m...@blumenstrasse.vol.at> writes:
> whenever I close a JDBC connection, the following log message is printed:
> DEBUG: pq_recvbuf: unexpected EOF on client connection

This appears to be fixed in current sources, where I read:

public void close() throws SQLException
{
if (pg_stream != null)
{
try
{
pg_stream.SendChar('X');
pg_stream.flush();
pg_stream.close();
}
catch (IOException e)
{}
pg_stream = null;
}
}

public void finalize() throws Throwable
{
close();
}

Without this, destroying the JDBC connection simply results in
unceremoniously closing the TCP connection. If you do that without
sending 'X', the backend complains ...

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

Matthias Brunner

unread,
Aug 14, 2002, 3:29:12 PM8/14/02
to
On Wednesday 14 August 2002 17:58, Barry Lind wrote:
> Matthias,
>
> I am not aware of any bug like this. This problem used to exist in the
> 7.0 drivers but was fixed a long time ago. I certainly don't see this
> in my applications. Are you sure you are calling Connection.close()?
> If you don't close the connection properly then you will see this
> message. If you can reproduce please send a test case to the mail list
> and we will look at the problem.

Really strange. I tried it again (as I remember without changing anything i=
n=20
the code) and couldn't reproduce it. Probably I'm just a dumbass. Sorry for=
=20
bothering you and thanks for both your rapid answers.

BTW: Shouldn't Connection.close() be called from Connection.finalize() if t=
he=20
connection is still open? The mysql JDBC driver does this.

Cheers!

0 new messages