title: Is there a limitation on Web3.js API calls?
body: <p>I am trying to traverse over blocks and get their transaction information like this:</p>
  
  <pre><code>var endOfLoop = app.web3.eth.blockNumber;
  var latestBlockNumberInDb = 1;
      for (var i = latestBlockNumberInDb; i &lt;= endOfLoop; i++) {
          var block = app.web3.eth.getBlock(i, true);
          console.log(i);
          if (block.transactions.length) { 
              /*TODO*/
              }
          else {
              /*TODO*/
              }
          }
  </code></pre>
  
  <p>The problem is I am correctly getting around 525-545 block and then,
  <code>app.web3.eth.getBlock(i)</code> call blocks the execution. Loop stucks there. It is not about the incoming block that possibly make the process erroneous because when I start the loop from the block 1000 it correctly fetches blocks 1000 - 1540 and stucks at 1540. </p>
  
  <p>Also <code>app.web3.eth.blockNumber</code> is something like 3 million and anyways the problem is not about terminating loop.</p>
  
  <p>The interesting thing is, iteration count over loop is not stable. It is always changing between 525-545.</p>
  
  <p>I tried to put a delay between requests but that also didn't work.</p>
  
  <p>Also when I double the API call as below:</p>
  
  <pre><code>var block = app.web3.eth.getBlock(i, true);
  block = app.web3.eth.getBlock(i, true);
  </code></pre>
  
  <p>Loop iterates around 270 times.</p>
  
  <p>Is there a limit for API calls? How can it be surpassed if so?</p>