Re: DataSource suddenly drops all connections? - Mailing list pgsql-jdbc

From Barry Lind
Subject Re: DataSource suddenly drops all connections?
Date
Msg-id 3E5262D4.9080005@xythos.com
Whole thread Raw
In response to DataSource suddenly drops all connections?  (Holger Klawitter <lists@klawitter.de>)
Responses Re: DataSource suddenly drops all connections?  (Holger Klawitter <lists@klawitter.de>)
List pgsql-jdbc
Holger,

Have you tried the latest jdbc build for 7.3 from the website?  There
was a recent bug fix that looks similar to what you are reporting here.

thanks,
--Barry


Holger Klawitter wrote:
> Hi there,
>
> I've run into a strange problem with Tomcat (4.1.12; JDK 1.4.1_01; Linux
> 2.4.19). My webappliaction connects to a postgres database (7.3) via
> javax.sql.DataSource (I am using the jdbc driver coming with 7.3).
>
> From time to time out of the blue the DataSource seems to deliver broken
> connections.
>
> java.net.SocketException: Broken pipe
>         at java.net.SocketOutputStream.socketWrite0(Native Method)
>         at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
>         at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
>         at
> java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:69
> )
>         at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:127)
>         at org.postgresql.PG_Stream.flush(PG_Stream.java:352)
>         at org.postgresql.core.QueryExecutor.sendQuery(QueryExecutor.java:154)
>         at org.postgresql.core.QueryExecutor.execute(QueryExecutor.java:70)
>         at
> org.postgresql.jdbc1.AbstractJdbc1Connection.ExecSQL(AbstractJdbc1Con
> nection.java:505)
>         at
> org.postgresql.jdbc1.AbstractJdbc1Statement.execute(AbstractJdbc1Stat
> ement.java:320)
>         at
> org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Stat
> ement.java:48)
>         at
> org.postgresql.jdbc1.AbstractJdbc1Statement.executeQuery(AbstractJdbc
> 1Statement.java:153)
>         at
> org.postgresql.jdbc1.AbstractJdbc1Statement.executeQuery(AbstractJdbc
> 1Statement.java:141)
>         at
> org.apache.commons.dbcp.DelegatingStatement.executeQuery(DelegatingSt
> atement.java:162)
>     at ....
>
> Sometimes I find an error in the catalina and in the postgres log indicating
> that *one* statement got garbled (SQL syntax error). It looks like this:
>
> ERROR:  parser: unterminated quoted string at or near "'Ort: xxxxxxxxxxxx" at
> character 52
> FATAL:  Socket command type ' unknown
>
> From then on, nothing reaches postgres any more.
>
> I am quite confident that the servlet itself is thread safe, and the statement
> being sent is (afaict) correct (everything nicely escaped and such). Moreover
> such an error should not break all connections in the pool, should it?
>
> Has anyone observed similar behaviour? What can I do to narrow down the bug
> in order to blame the right one? :-)
>
> With kind regards / mit freundlichem Gruß
>     Holger Klawitter
> --
> Holger Klawitter                          http://www.klawitter.de
> lists@klawitter.de
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo@postgresql.org so that your
> message can get through to the mailing list cleanly
>




pgsql-jdbc by date:

Previous
From: Holger Klawitter
Date:
Subject: DataSource suddenly drops all connections?
Next
From: "Dirk Bromberg"
Date:
Subject: ConnectionPool newbie