title: Failed to load resource: net::ERR_INSUFFICIENT_RESOURCES with looped ajax query
body: <p>I have implemented a system in which 10,000 calls are made to a PHP file which generates a random number for each call and stores it in a database table. However, I am receiving the error regarding insufficient resources. Upon evaluating the database table, it seems that 4,000 numbers have been stored successfully despite the error messages.</p>
  <p>Below is the javascript code containing the ajax calls:</p>
  <pre><code>     function randNoCall() {
          $.ajax({
            url: &quot;randomNum.php&quot;,
            method: &quot;GET&quot;,
            success: function (res) {
              console.log(res);
              callsMade++;
              if (callsMade == 9999) {
                $(&quot;p&quot;).html(&quot; &lt;table&gt; &lt;tr&gt;&lt;th&gt;Number Generated&lt;/th&gt;&lt;th&gt;Instance Name&lt;/th&gt; &lt;/tr&gt; &quot; + res + &quot;&lt;/table&gt; &lt;br/&gt;   &lt;button id='evaluateButton' onClick='Evaluate()'&gt;Evalaute&lt;/button&gt; &lt;/br&gt;&quot;);
              }
            },
          });
        }
        var i;
        var callsMade = 0;
        for (i = 0; i &lt; 10000; i++) {
          randNoCall();
        }
  </code></pre>
  <p>The <code>res</code> variable returns the table data, meaning the numbers generated, in a table.</p>