|
|||||||||||
|
[JDBC] Connection attempt hangs when server is unresponsive
From: Woody Woodring <george.woodring(at)iglass.net>
Date: Wed Dec 05 2007 - 14:30:15 EST We are using 1.2.1 of DBCP with our tomcat server to pool connections to databases on the wide area. We had an issue today were our tomcat threads started increasing dramatically when we had a Postgres server go away and we found a lot of threads stuck trying to create a datasource:
at
at
at
at
Since createDataSource is synchronized we traced them to the following thread that had them blocked:
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
at
java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
at java.net.Socket.connect(Socket.java:516)
at java.net.Socket.connect(Socket.java:466)
at java.net.Socket.(Socket.java:366)
at java.net.Socket.(Socket.java:179)
at org.postgresql.core.PGStream.(PGStream.java:58)
at
org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFa ctoryImpl.java:77)
at
at
at
at org.postgresql.jdbc3.Jdbc3Connection.(Jdbc3Connection.java:24)
at org.postgresql.Driver.connect(Driver.java:235)
at
org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConne ctionFactory.java:37)
at
at
at
at
at
at
My question is why this thread did not error out when it could not talk to the server? Could the server have been up when the connection started and went away in the middle causing errors? Could there be something we have overlooked in our conf that would time it out? When the db server came back, our thread count dropped from 200 down to 35 which is normal.
Thanks in advance,
iGLASS Networks 211-A S. Salem St Apex NC 27502 (919) 387-3550 x813 www.iglass.net ---------------------------(end of broadcast)---------------------------TIP 6: explain analyze is your friend Received on Wed Dec 5 14:31:44 2007 This archive was generated by hypermail 2.1.8 : Wed Jun 18 2008 - 23:40:52 EDT |
||||||||||
|
|||||||||||