| Author |
Connection reset by peer error
|
Hanna Habashy
Ranch Hand
Joined: Aug 20, 2003
Posts: 532
|
|
hi: I am using Tomcat and SQL2k. I have a simple app. that does a simple database query. If I left my browser running for long time, then try to access the app., I got this error: [Microsoft][SQLServer 2000 Driver for JDBC]Connectin reset by peer:socket write error. If i open a new browser window, I got the same error. It goes away only if I redeploy the application. In my web.xml, I don't have any time out parameters of any kind. Does anyone know what is going on. thanks
|
SCJD 1.4<br />SCJP 1.4<br />-----------------------------------<br />"With regard to excellence, it is not enough to know, but we must try to have and use it.<br />" Aristotle
|
 |
Jeanne Boyarsky
internet detective
Marshal
Joined: May 26, 2003
Posts: 26184
|
|
Hanna, The database has a timeout and the driver probably has a timeout. Are you closing the connection in a finally block? If not, you could have a resource leak.
|
[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
|
 |
Hanna Habashy
Ranch Hand
Joined: Aug 20, 2003
Posts: 532
|
|
hi Jeanne: Yes I am closing all of my JDBC resources in a finally block after each query. What is driver timeout? When I open a new window, I got the same error message. If my session timeout, shouldn't a new window start a new session? thanks
|
 |
Jeanne Boyarsky
internet detective
Marshal
Joined: May 26, 2003
Posts: 26184
|
|
Hannah, After a certain amount of time passes, the driver kills the connection. This helps prevent deadlocks. When you open a new window, you get a new http session. If you are using connection pooling, the database error could be independent of the session.
|
 |
 |
|
|
subject: Connection reset by peer error
|
|
|