Quantcast
Channel: Adobe Community : Unanswered Discussions - ColdFusion
Viewing all articles
Browse latest Browse all 5794

Repeated calls to CFC result in error after several successful calls

$
0
0

I'm trying to use cfajaxproxy to complete information for a number of sites (code below).  The arySites array contains about 300 elements, and the loop executes successfully until it gets near the end, then I get an error "cfc cannot be invoked".  The cfc does a cfhttp call with a timeout of 10 seconds, and returns a struct with the IP passed as an argument and a version number (or "Unk" if the call times out).  The CFC functions perfectly when invoked by itself, and it always returns at least the first 200 items when called in the load() function, but I get errors for the last several sites (and not always starting at the same place).  I thought this might be a limitation on the server but when I copied the code to another server exactly the same thing happened.

 

Any insights greatly appreciated.


Thanks,

Ken

 

<script src="ajax_lib.js"  type="text/javascript"></script>
<cfajaxproxy cfc="test" jsclassname="proxy" />
<script language="javascript">
var objStatus = new proxy();
objStatus.setAsyncMode();
objStatus.setCallbackHandler(function (sctResult) {showVersion(sctResult)});

 

function load()
{
for (idx = 0; idx < arySites.length; idx ++)
{
var strIP = arySites[idx].ip;
objStatus.getVersion(strIP);
}
}

function showVersion(sctResult)
{
var strVersion = sctResult.VERSION;
var strIP = sctResult.IP;
objRow = document.getElementById(strIP);
objCell = objRow.cells[3];
objCell.innerHTML = strVersion;
}
</script>


Viewing all articles
Browse latest Browse all 5794

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>