Connection reset - by Cristisan

Status : 

  Not Reproducible<br /><br />
		The product team could not reproduce this item with the description and steps provided.<br /><br />
		A more detailed explanation for the resolution of this particular item may have been provided in the comments section.

Sign in
to vote
ID 676337 Comments
Status Closed Workarounds
Type Bug Repros 1
Opened 6/21/2011 2:29:15 PM
Access Restriction Public


Hi everyone, 

I'm facing the following problem in a Server runing Linux with JBoss AS 4.2.2, JRE 1.6, and MSSQL Server 2005 with the sqljdbc4.jar driver

The thing is: on friday morning I started up the server and everything worked fine ... next, from Friday at 6pm to Saturday at 8am nobody has used the system. 

Then on Saturday at 8:05 got the following warning lines every time I tried to do something in my application. While it seems that everything works, after a few days the system starts to decrease their performance and malfunction, so I want to know why it might happen these warnings.

I have tried to find a solution to this problem in several places but I'm not succeeding. That's why I'm writing my problem here... 

Hope somebody can help me!

Thanks in advance and best regards!




This is the "error" log.

2011-06-11 08:05:29,680 WARN [org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory] Destroying connection that is not valid, due to the following exception: ConnectionID:2941 Connection reset
	at org.jboss.resource.adapter.jdbc.CheckValidConnectionSQL.isValidConnection(
	at org.jboss.resource.adapter.jdbc.BaseWrapperManagedConnectionFactory.isValidConnection(
	at org.jboss.resource.adapter.jdbc.BaseWrapperManagedConnection.checkValid(
	at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.matchManagedConnections(
	at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.getConnection(
	at org.jboss.resource.connectionmanager.JBossManagedConnectionPool$BasePool.getConnection(
	at org.jboss.resource.connectionmanager.BaseConnectionManager2.getManagedConnection(
	at org.jboss.resource.connectionmanager.TxConnectionManager.getManagedConnection(
	at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(
	at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(
	at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(
	at org.hibernate.connection.DatasourceConnectionProvider.getConnection(
	at org.hibernate.jdbc.ConnectionManager.openConnection(
	at org.hibernate.jdbc.ConnectionManager.getConnection(
	at org.hibernate.jdbc.AbstractBatcher.prepareQueryStatement(
	at org.hibernate.loader.Loader.prepareQueryStatement(
	at org.hibernate.loader.Loader.doQuery(
	at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(
	at org.hibernate.loader.Loader.doList(

And this is my mssql-ds.xml

	 <type-mapping>MS SQLSERVER2000</type-mapping>
	 <new-connection-sql>select 1</new-connection-sql>
	 <check-valid-connection-sql>select 1</check-valid-connection-sql>	
Sign in to post a comment.
Posted by Sumadhur [MSFT] on 10/11/2011 at 1:21 PM
Do you have any details on what the problem was?
Posted by Cristisan on 10/11/2011 at 12:33 PM
We lost that customer, that is why you have not heard of us again. Thank you.
Posted by Sumadhur [MSFT] on 10/11/2011 at 12:18 PM
We have not heard back from the customer on this since 7/29. So, resolving this as No Repro as there is not enough information to proceed.

Posted by Sumadhur [MSFT] on 9/19/2011 at 5:54 PM
Also, when connecting to SQL Azure, idle connections may be terminated by a network component (such as a firewall) after a period of inactivity. To avoid dropping idle connections by a network component, the following registry settings (or their non-Windows equivalents) should be set on the operating system where the driver is loaded:
         Registry Setting                                                                                                                                                                     Recommended value
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\KeepAliveTime                 30000     (30 seconds)
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\KeepAliveInterval             1000     (1 second)
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\TcpMaxDataRetransmission     10

For your reference, the non-windows equivalents can be found at
Posted by Sumadhur [MSFT] on 8/26/2011 at 4:31 PM
Where do you see slow performance? Is it with the driver or SQL Azure? Could you provide us a repro as to where you see lower performance compared to other drivers?
Posted by Jacek____ on 7/29/2011 at 2:56 AM

In my case this is jBoss AS 6, JRE 1.6, and SQL Azure. The exceptions appeared just after I switched from a datasource based on postgreSQL to SQL Azure. The setup seems to work fine but performance is really hampered.
Posted by Sumadhur [MSFT] on 6/28/2011 at 3:11 PM
The error seems to be due to the usage of connections(probably those that were idle for some time) that are closed.

Could you please provide the corresponding jdbc traces in finest mode for further analysis?



Posted by Sumadhur [MSFT] on 6/24/2011 at 10:38 AM
Thanks for your feedback. We are evaluating this and will get back to you as soon as possible.