Here my problem is "java.sql.SQLException: [Microsoft][SQLServer JDBC Driver]System Exception: Connection reset by peer: socket write error".
I'm receiving the above error from my application. ( i.e )my application is communicating with Sql Server continously, and there is no request for a long time from my application to SqlServer and if i tried any request to Sql Server. im getting this error.
I just want to know, is the problem is from Sql Server side or from my application.
Whatever it is please help me to solve this. I couldn't able to reproduce this problem.
"Connection reset by peer" means the SQL Server instance itself deliberately closed yopur connection. There are a number of reasons this could happen depending on what your application is doing:
The SQL Server instance may have been stopped
The connection has timed out
In the case of binary data, the stream is reset.
It sounds like the second reason is the most likely. My guess is you open a connection and leave it open doing nothing, is this the case?
I don't think it is your DataSource definition that is the problem. Do you always close connections? Has the database server been restarted? Look in the SQL Server logs, it should tell you what caused the server to decide to drop the connection.
hi Paul
I 'm getting the same error after three days .so when i restart my tomcat it is working fine but .im not getting why this is going to be happining and i observed that if no request came to my tomcat for 2 days then it will give this error..
and i had also increased
in my server.xml file so kindly help in overcome this problem
Can you use the validationquery functionallity of your connection pool? It will validate connections before giving them to you, and discards and recreates stale connections.
Regards, Jan
Post by:autobot
All of the world's problems can be solved in a garden - Geoff Lawton. Tiny ad:
a bit of art, as a gift, the permaculture playing cards