I have a complex J2EE Web Application I'm hosting on
Tomcat and connecting to MS SQL Server on the backend
using the Microsoft's JDBC Driver. It all has been
working fine for a long time and now recently all of a
sudden I start getting the following exceptions randomly.
There is no co-relation I can find to anything known.
Previously this used be like a temporary glitch that will
go away, but now I suspect only restarting the Web App
clears this. I'm not using any connection pooling. Any
pointers? TIA.
java.sql.SQLException: [Microsoft][SQLServer 2000 Driver
for JDBC]Error establishing socket.
at
com.microsoft.jdbc.base.BaseExceptions.createException
(Unknown Source)
at
com.microsoft.jdbc.base.BaseExceptions.getException
(Unknown Source)
at
com.microsoft.jdbc.base.BaseExceptions.getException
(Unknown Source)
at
com.microsoft.jdbc.sqlserver.tds.TDSConnection.<init>
(Unknown Source)
at
com.microsoft.jdbc.sqlserver.SQLServerImplConnection.open
(Unknown Source)
at
com.microsoft.jdbc.base.BaseConnection.getNewImplConnectio
n(Unknown Source)
at
com.microsoft.jdbc.base.BaseConnection.getImplConnection
(Unknown Source)
at
com.microsoft.jdbc.base.BaseStatement.setupImplConnection
(Unknown Source)
at com.microsoft.jdbc.base.BaseStatement.<init>
(Unknown Source)
at
com.microsoft.jdbc.base.BaseConnection.createStatement
(Unknown Source)
at
com.microsoft.jdbc.base.BaseConnection.createStatement
(Unknown Source)
Neeraj Vora wrote:
> Hello,
>
> I have a complex J2EE Web Application I'm hosting on
> Tomcat and connecting to MS SQL Server on the backend
> using the Microsoft's JDBC Driver. It all has been
> working fine for a long time and now recently all of a
> sudden I start getting the following exceptions randomly.
> There is no co-relation I can find to anything known.
> Previously this used be like a temporary glitch that will
> go away, but now I suspect only restarting the Web App
> clears this. I'm not using any connection pooling. Any
> pointers? TIA.
>
> java.sql.SQLException: [Microsoft][SQLServer 2000 Driver
> for JDBC]Error establishing socket.
What OS is this running on? COuld the OS process be running
out of file descriptors? It's a really good idea to pool connections,
it would solve this problem and give you better performance...
Joe Weinstein at BEA
Thanks for responding. The Web App is running on Solaris
8. Tomcat on Solaris has been a rock solid formation so
far. Microsoft JDBC Driver does not implement connection
pooling and we didn't want to spend money buying a paid-
for JDBC driver. I did measure connection overhead and
found only about 20-30ms as compared to 200-200ms total db
operation time. I do see see a spike on the open TCP
connection graph at around the time this happened last,
but the concurrent usage at the time was quite low (2-3
users only). I'm thinking maybe some network issue
prevents TCP connection from being established in a timely
fashion and JDBC driver times out and throws an exception
and the user might repeatedly hit a button causing a flood
of requests and subsequent running out of descriptors. So
is it possible the latter is the effect rather than the
cause?
Thanks,
Neeraj
>.
>