Archive for July, 2010

New Music

Posted on: July 29th, 2010 by admin No Comments

Not much about music lately. Not much about anything.

Except

Listen to the album, cd or whatever label get’s attached to a group of songs these days
“Inner Speaker” by Tame Impala
“Street Songs of Love” by Alejandro Escovedo
How to Destroy Angels if you are into Nine Inch Nails or West Indian Girl, otherwise it will drive you crazy.

Coldfusion ODBC Timeout Solution

Posted on: July 11th, 2010 by admin No Comments

My posts to this blog have been seldom lately but putting this out here in hope that it will help someone out of the same sticky situation I’ve been in for the past few weeks.

I took on an intranet project that had to integrate with Medact which uses Sybase as the database. We installed Coldfusion 9 on the server and used an ODBC connection to Sybase. Everything worked swimmingly until I encountered seemingly random dropped connections between CF9 and the ODBC/Sybase connection. Several calls to Adobe failed to remedy the situation which appeared to stem from the datadirect driver. The solution appears to be pausing and flushing the thread at the java level.

If you run into the same issue try copy and pasting this just before your <cfquery>,

<cfset thread = CreateObject(“java”, “java.lang.Thread”)>
<cfflush>
<cfset thread.sleep(5000)>

especially if you are looping through and pulling back records. In my case I had to pull back 330k records out of approx 1330000 from sybase into mysql using a scheduled task. Since implementing this I have experienced zero errors. My suspicion is that the issue doesn’t actually stem from the datadirect driver but from a bug Medacts implementation. I’ve connected to all sorts of databases in the past several years with CF without a hiccup with the exception of unidata on a Datatel application (which is a trainwreck anyway).

In addition, another quirk I encountered was that after initiating the query manually (looping through records in increments of 20K )CF would return a blank page, however the query continued to run until finished.

If you landed on this page in a frantic search for a solution, give this a try, it worked for me.