Setup: CFMX 6.11, Windows 2003 Server, IIS, SQL Server 8 / SP3, Latest 
JDBC drivers from MM website (3.4)
Error Message:
Error Executing Database Query. [Macromedia][SQLServer JDBC 
Driver]Connection reset by peer: socket write error

First, I never saw this error until I updated the JDBC drivers to 3.4 
last week.  The job that is failing with this error message was 
succeeding for months before the driver upgrade.  With that in mind, the 
job runs a single query against a db, then queries another database for 
20-40 minutes, then returns to the FIRST db and runs another query.  
Every single time, if the first and last queries are seperated by more 
than 20 minutes, that second query will fail with the 'socket write error'.

I can reproduce this error every time, outside of my specific code, with 
a very simple waiting mechanism.  datasource and table names have been 
changed to protect the innocent.

trying query 1...<br>
<cfquery name="bar" datasource="DATASOURCEONE">
SELECT MIN(datestamp) FROM TABLENAME
</cfquery>
<!--- loop a 5 minute wait, 8 times. to make java wait for 40 minutes --->
<cfloop from="1" to="8" index="i">
  <cfoutput>
    pausing for 5 minutes, beginning at #timeFormat(now(),"HH:mm")#...<Br>
  <cfflush>
  </cfoutput>
  <cfset oThread = CreateObject("java", "java.lang.Thread") />
  <cfset oThread.sleep(300000) />
  waking up...<br>
</cfloop>
trying last query...
<cfflush>
<cftry>
<cfquery name="bar" datasource="DATASOURCEONE">
SELECT MIN(datestamp) FROM TABLENAME
</cfquery>
 <cfcatch type="any">
<cfdump var="#CFCATCH#">
</cfcatch>
</cftry>
<b>OK</b>

If I were to run a query on the same datasource inside of that wait 
loop, thereby hitting the DB every 5 minutes, I would not get the 
'socket write' error

I assumed this had something to do with timeout values or maintaining 
connections, I seem to be wrong on both accounts.  I tried changing 
timeout values on the drivers to 5, 20 and 60 minutes, each time trying 
once while 'maintain connections' was checked and once with it unchecked.

Is there any way to make these new drivers actually run this second 
query?  Is there a specific timeout value that would make the connection 
actually timeout and re-establish itself or NOT timeout... instead of 
timing out and then trying to use the timed out connection?  Or am I on 
the wrong path with timeout values?

Any advice would be fantastic.  TIA,
-Jeff



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Find out how CFTicket can increase your company's customer support 
efficiency by 100%
http://www.houseoffusion.com/banners/view.cfm?bannerid=49

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:218837
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to