Connection closed from application end

The application server gets below error while the job is being run intermittently:

An error occured while performing connection management
com.microsoft.sqlserver.jdbc.SQLServerException: The connection is closed.
 at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(SQLServerException.java:171)
 at com.microsoft.sqlserver.jdbc.SQLServerConnection.checkClosed(SQLServerConnection.java:319)
 at com.microsoft.sqlserver.jdbc.SQLServerConnection.prepareStatement(SQLServerConnection.java:1839)
 at com.microsoft.sqlserver.jdbc.SQLServerConnection.prepareStatement(SQLServerConnection.java:1550)
 at sun.reflect.GeneratedMethodAccessor7.invoke(Unknown Source)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:597)
 at com.carreker.icom.common.ConnectionProxy.invoke(ConnectionProxy.java:89)
 at $Proxy91.prepareStatement(Unknown Source)

..............................................................................................................................................................

There is no error reported in SQL logs. Please advise.

June 30th, 2015 1:19am

com.microsoft.sqlserver.jdbc.SQLServerException: The connection is closed


Check/Debug your code if the connection is opened before you execute any command.
Free Windows Admin Tool Kit Click here and download it now
June 30th, 2015 2:11am

Based on the below message that your connection was closed, so you received this error.

"com.microsoft.sqlserver.jdbc.SQLServerException: The connection is closed."

Few things why this connection is closed.

1) check in your program code to make sure connection is not closed.

2) it is possible that your connection is timed out. check the application server connection time out value you will get an idea. 

3) Another possibility that you might have slow running queries.

June 30th, 2015 2:42am

The job gets executed smoothly after rerun.
Free Windows Admin Tool Kit Click here and download it now
June 30th, 2015 8:50am

The job gets executed successfully after rerun. The above issue is not faced on daily basis . Like for example in last three weeks it has encountered this issue thrice.

June 30th, 2015 8:52am

It could be amount of data or number of rows to process.

It is hard to guess for any one of us what exactly the cause. 

You need to research the root cause. 

you mentioned it is a JOB. is it SSIS package agent job. Rowes processed per batch or some related property....could be causing this issue....

All the best.

Free Windows Admin Tool Kit Click here and download it now
July 2nd, 2015 12:56am

The above issue is not faced on daily basis .

Could be a network issue, e.g. a faulty switch disconnect the connectivity sometimes.
July 2nd, 2015 2:18am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics