Re: Kinda urgent Connection error messages
From: Saran (Saran_at_discussions.microsoft.com)
Date: 11/22/04
- Next message: Joe Weinstein: "Re: Kinda urgent Connection error messages"
- Previous message: Andrew: "Re: why excute query through JDBC much slow than query analyzer?"
- In reply to: Joe Weinstein: "Re: Kinda urgent Connection error messages"
- Next in thread: Joe Weinstein: "Re: Kinda urgent Connection error messages"
- Reply: Joe Weinstein: "Re: Kinda urgent Connection error messages"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 22 Nov 2004 07:49:04 -0800
All the calls to the pool are syncronized as well pool itself checks if a
connection object is NOT in use before it returns to request.
As you suggested i can run a simple query before the pool returns a
connection to a request. You said "select 1", is it a valid query to validate
a connection object or just a sample query that i need to convert to "SELECT
Column1 FROM Table1".
"Joe Weinstein" wrote:
>
>
> Saran wrote:
>
> > We have adapted connection pool concept from the article below, to manage
> > connection objects.
> > http://java.sun.com/developer/onlineTraining/Programming/JDCBook/conpool.html
> >
> > We made a log file to see how many connections objects are maintained in
> > given time, most of the i noticed there will be only one connection object in
> > the pool to server, very occassionally i could see 2 to 3 connection object
> > in the pool.
> >
> > does the above pooling concept may have problem?
>
> Hi. The *concept* has no problem, but the implementation may. If it is not threadsafe,
> you may well have one thread closing a connection while another is using it, in which
> case you could have any sort of odd failure... but, not, these symptoms are all below
> the driver or pool or application. Pooling is good. I would verify if the problems
> that come up are when you use a connection that's been idle in the pool for a long
> time. You could easily add a checker in the pool, which does a quick "select 1" during
> your call to the pool for a connection. If the test passes, the connection is as
> good as you can ensure. If the query fails, the pool can replace it and give you a
> new one. BEA's WebLogic connection pools do a lot of this pretesting and protection...
> Joe Weinstein at BEA
>
> >
> > "Joe Weinstein" wrote:
> >
> >
> >>
> >>Saran wrote:
> >>
> >>
> >>>Hi Joe, As mentioned by John A. Davis, we are getting the following 3
> >>>different error message at a random fashion
> >>>
> >>>[Microsoft][SQLServer 2000 Driver for JDBC]Error establishing socket
> >>>[Microsoft][SQLServer 2000 Driver for JDBC]Connection reset
> >>>[Microsoft][SQLServer 2000 Driver for JDBC]Connection reset by peer: socket
> >>>write error
> >>>
> >>>Our prodcut is web based Java application, our application is configured
> >>>under Tomcat5 in one machine and the MS-SQL Server 2000 is running on another
> >>>machine, both the machines are in the same network in intranet. Right now we
> >>>are using MS-JDBC Driver SP2. The above listed errors occurring atlest 2 to 3
> >>>times a day, otherwise the application works fine. I am still wondering why
> >>>these error occurring in intranet based setup? any help on this appreciated.
> >>
> >>Hi. I wish I could help you more, but I can tell you that from the JDBC
> >>driver perspective, these are all unexpected problems the driver is suffering
> >>when the raw TCP socket it is using to talk to the DBMS either dies or fails
> >>to be created. I guarantee that the driver is making the socket the same way
> >>each time, so every creation should work the same way, and once it's open,
> >>it should just work until it's closed. This is a problem beyond the application
> >>and driver. Do you hold JDBC connections open indefinitely, sometimes without using
> >>them for a long time? Does the problem seem to occur right after a long idle
> >>period? Maybe the DBMS has an idle connection timeout, and is closing your
> >>connections out from under you. Also, if you do have a limit on the number of
> >>DBMS connections you are allowed, how are you controlling the number of connections
> >>you try to make.
> >>Joe Weinstein at BEA
> >>
> >>
> >>>"Joe Weinstein" wrote:
> >>>
> >>>
> >>>
> >>>>Hi John. Check the DBMS error log. I believe the DBMS is in trouble. The driver is just
> >>>>finding out that the socket connection it sues to the DBMS is dieing.
> >>>>Joe Weinstein at BEA
> >>>>
> >>>>jdnospam@hevanet.com wrote:
> >>>>
> >>>>
> >>>>
> >>>>>Websphere application for nurses license renewal application that hits our SQL Server 2000.
> >>>>>
> >>>>>This was the first error that we decided to stop and start the application:
> >>>>>Unable to load SQL Server Data Driver driver.
> >>>>>Unable to create database connection.
> >>>>>[Microsoft][SQLServer 2000 Driver for JDBC]Error establishing socket.
> >>>>>com.obs.data.DataObjectException: [Microsoft][SQLServer 2000 Driver for JDBC]Err or establishing socket.
> >>>>>
> >>>>>
> >>>>>This is the send stream of errors after we had thought we had solved the problem. This is kinda urgent because there are nurses out there waiting to get their licenses renewed and mad as heck:
> >>>>>
> >>>>>[Microsoft][SQLServer 2000 Driver for JDBC]Connection reset by peer: Connection reset by peer
> >>>>>java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Connection res et by peer: Connection reset by peer
> >>>>> 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.TDSRequest.processReply(Unknown
> >>>>>Sour
> >>>>>ce)
> >>>>> at com.microsoft.jdbc.sqlserver.SQLServerImplStatement.getNextResultType
> >>>>>(Unknown Source)
> >>>>> at com.microsoft.jdbc.base.BaseStatement.commonTransitionToState(Unknown
> >>>>>Source)
> >>>>> at com.microsoft.jdbc.base.BaseStatement.postImplExecute(Unknown
> >>>>>Source)
> >>>>> at com.microsoft.jdbc.base.BaseStatement.commonExecute(Unknown
> >>>>>Source)
> >>>>> at com.microsoft.jdbc.base.BaseStatement.executeUpdateInternal(Unknown S
> >>>>>ource)
> >>>>> at com.microsoft.jdbc.base.BaseStatement.executeUpdate(Unknown
> >>>>>Source)
> >>>>>
> >>>>>
> >>>>>**********************************************************************
> >>>>>Sent via Fuzzy Software @ http://www.fuzzysoftware.com/
> >>>>>Comprehensive, categorised, searchable collection of links to ASP & ASP.NET resources...
> >>>>
> >>>>
> >>
>
>
- Next message: Joe Weinstein: "Re: Kinda urgent Connection error messages"
- Previous message: Andrew: "Re: why excute query through JDBC much slow than query analyzer?"
- In reply to: Joe Weinstein: "Re: Kinda urgent Connection error messages"
- Next in thread: Joe Weinstein: "Re: Kinda urgent Connection error messages"
- Reply: Joe Weinstein: "Re: Kinda urgent Connection error messages"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|