- Remove From My Forums
Connection reset by peer: socket write error error on sqlserver 2008
-
Question
-
Hi,
I am using SQl server 2008 with JBoss 4. We are not getting this error on development enviorment but somtimes we are observing this on production. It seems to me this happening when it is firing insert query. Please help
com.microsoft.sqlserver.jdbc.SQLServerException: Connection reset by peer: socket write error
at com.microsoft.sqlserver.jdbc.SQLServerConnection.terminate(SQLServerConnection.java:1352)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.terminate(SQLServerConnection.java:1339)
at com.microsoft.sqlserver.jdbc.TDSChannel.write(IOBuffer.java:1602)
at com.microsoft.sqlserver.jdbc.TDSWriter.flush(IOBuffer.java:2418)
at com.microsoft.sqlserver.jdbc.TDSWriter.writePacket(IOBuffer.java:2320)
at com.microsoft.sqlserver.jdbc.TDSWriter.endMessage(IOBuffer.java:1927)
at com.microsoft.sqlserver.jdbc.TDSCommand.startResponse(IOBuffer.java:5291)
at com.microsoft.sqlserver.jdbc.SQLServerStatement.doExecuteCursored(SQLServerStatement.java:1851)
at com.microsoft.sqlserver.jdbc.SQLServerStatement.doExecuteStatement(SQLServerStatement.java:749)
at com.microsoft.sqlserver.jdbc.SQLServerStatement$StmtExecCmd.doExecute(SQLServerStatement.java:676)
at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:4874)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:1400)
at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeCommand(SQLServerStatement.java:179)
at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeStatement(SQLServerStatement.java:154)
at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeQuery(SQLServerStatement.java:611)
at org.apache.commons.dbcp.DelegatingStatement.executeQuery(DelegatingStatement.java:188)
posted 13 years ago
-
-
Number of slices to send:
Optional ‘thank-you’ note:
-
-
Hi Friends,
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.
Creativity is nothing but Breaking Rules
posted 13 years ago
-
-
Number of slices to send:
Optional ‘thank-you’ note:
-
-
«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:
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?
santhosh.R gowda
Ranch Hand
Posts: 296
posted 13 years ago
-
-
Number of slices to send:
Optional ‘thank-you’ note:
-
-
Is there any change i had to made to overcome this problem….so please let me know
Creativity is nothing but Breaking Rules
Paul Sturrock
Bartender
Posts: 10336
posted 13 years ago
-
-
Number of slices to send:
Optional ‘thank-you’ note:
-
-
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.
santhosh.R gowda
Ranch Hand
Posts: 296
posted 13 years ago
-
-
Number of slices to send:
Optional ‘thank-you’ note:
-
-
But here in log file of Data Base im not getting any error details
Creativity is nothing but Breaking Rules
santhosh.R gowda
Ranch Hand
Posts: 296
posted 13 years ago
-
-
Number of slices to send:
Optional ‘thank-you’ note:
-
-
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
Creativity is nothing but Breaking Rules
posted 13 years ago
-
-
Number of slices to send:
Optional ‘thank-you’ note:
-
-
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
OCUP UML fundamental and ITIL foundation
Problem
ERROR SQL State: 08S01 java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Connection reset by peer: socket write error (SCI87523)
Symptom
When the error occurred, all subsequent executions of the business process
failed with the same error until Gentran Integration Suite was restarted.
ERROR [LightweightJDBCAdapter] Error executing sql query «SELECT COUNT(*) AS
‘Count’ FROM dbo.Orders ord WHERE ord.GT_key IS NULL AND ord.PaymentsPending =
0 AND ord.Void = 0».
ERROR SQL Error Code: 0
ERROR SQL State: 08S01
java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Connection
reset by peer: socket write error
ERROR [JDBCService] got a bad
connection, trying again
Cause
poolName.testOnReserve=true had not been set when the the connection pool
was defined in the jdbc_customer.properties file. If poolName.testOnReserve is
set to false,? GIS does not test the connections before being placed in the
connection pool,? or before being put back into the connection pool after being
used. If the? database referenced by the connection pool? is? shutdown for any
reason while GIS is still running, then the connections stored in the
connection pool become invalid.? Even if the database is restarted, the
connections stored in the pool are not refreshed.
In addition, if
poolName.testOnReserve is set to true, but the poolName.testOnReserveQuery is
not correct, or does not return the correct results, GIS will also display the
following error in the system.log file: ERROR [JDBCService] got a bad
connection, trying again
Resolving The Problem
The only supported method to reestablish the pool connections in the GIS
Release 3.1 is to restart the GIS application. For that reason, the database
should never be shut down while GIS is running, even if the database is
accessed only through an external pool connection.
[{«Product»:{«code»:»SS3JSW»,»label»:»IBM Sterling B2B Integrator»},»Business Unit»:{«code»:»BU059″,»label»:»IBM Software w/o TPS»},»Component»:»Not Applicable»,»Platform»:[{«code»:»PF025″,»label»:»Platform Independent»}],»Version»:»All»,»Edition»:»»,»Line of Business»:{«code»:»LOB59″,»label»:»Sustainability Software»}}]
Historical Number
PRI6725
Product Synonym
[<p><b>]Fact[</b><p>];Gentran Integration Suite;Release 3.1.00 [<br/>] Lightweight JDBC Adapter [<br/>] ;Microsoft SQL Server database [<br/>] SCI87523