I am loading summaries into my main page by making 5 AJAX calls using JQuery. The debugger shows that all calls start at the same time, but return results consecutively instead of simultaneously. i.e. First call returns after 5 secs, second returns after 10 secs, and so on.
I did not set async to false.
The server runs Centos7 with HTTPD and PHP7. YUM has applied all updates.
Evidently it's a matter of how many threads HTTPD is generating for each client call. I can't figure out how to make it create a separate thread for each.
// Get 4w records
$.ajax({
dataType: "json",
url: "getdata.php",
async: "true",
data: { 'db': '4w', 'function': 'registrations' },
method: "POST"
})
...
// Get 8c records
$.ajax({
dataType: "json",
url: "getdata.php",
async: "true",
data: { 'db': '8c', 'function': 'registrations' },
method: "POST"
})
...