0 Replies Latest reply on Apr 4, 2013 12:50 PM by gr8white1234

    Repeated calls to CFC result in error after several successful calls

    gr8white1234 Level 1

      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>