Page 1 of 1

synchronous call or limit max number of call?

Posted: Sun Jun 10, 2012 7:02 pm
by wvoyance
I use
$.getJSON( surl, pars, function(textDoc){});
to call database execution in a loop for about 100 execution or so.
Therefore, reached the maximum connection limit.

Is there any way to queue the job or made the call synchronous ?

Re: synchronous call or limit max number of call?

Posted: Sun Jun 10, 2012 10:46 pm
by Christopher
Probably you want to move the loop to the server. It will return all the data. Then you can loop through that with Javascript.

Re: synchronous call or limit max number of call?

Posted: Mon Jun 11, 2012 2:46 am
by wvoyance
Christopher wrote:Probably you want to move the loop to the server. It will return all the data. Then you can loop through that with Javascript.
cannot. The server has time limit for 10s. Which just enough for 1 item.