0
votes

This is an odd problem I am having, after about 60 seconds (timed 4 times). I am running a loop that does a HTTPService call (only takes a couple of sec) and when it's all finished it goes back to the function and repeats adding to a counter.

Code works for smaller test samples (never got above 92 items). Item in my case are folder names.

Is there some sort of a timeout with code that doesn't require user input? I have checked my code many times now but there's nothing that shouldn't work.

3
are you seeing a script timeout error? or it just quits making the call back on itself again? if it's a timeout error, you can get around than by periodically exiting the loop and adding a callLater() or Timer. Prevents synchronous locking. But if just quits calling back, there may be something else wrong that causes it to not make the next callback.Jason Reeves
No I get no errors, debugging traces just freeze and no calls happen any more. I've also checked the service but I always get http 200 so that cant be it, can't imagine what else it could be...DominicM
ah... I bet you are running into a browser timeout issue in your debugger. what OS / browser are you using and I'll tell you how to fix it... better yet, just google your browser type and flex debugger timeout... you'll see a bunch of tutorials on how to fix itJason Reeves
This is an AIR app so it doesn't run in a browser, or did you mean something else?DominicM
no, I missed that ("AIR") in the title... it was a thought.Jason Reeves

3 Answers

0
votes

Maybe the service is blocking you, because it is suspicious..

0
votes

ok this became interesting to me and I found this:

"The max-execution-time value specifies the maximum duration, in seconds, that an ActionScript event handler can execute before Flash Player assumes that it is hung, and aborts it. The default value is 60 seconds. You cannot set this value above 60 seconds."

so, my comment about breaking up using a timer is probably your best solution.

0
votes

In the end it turned out to be an error in the way loops were used. It was just a coincidence that it stopped running at about 60 seconds. I solved it by breaking up the series of loops into functions that call the next step/function when all requests are completed instead of right away.