I have my page which make an Ajax call to my PHP script searching for data in the database. When I refresh the page multiple times consecutively, my host's number of processes limit on 20 reached (20/20). Because of that, no more php script can be executed until the processes number gets down in like 3 or more minutes.

What's going on on the host when the page gets called and how to fix it? Let's say if 30 people (even less) log on my website, my website will crash.

Here is my script:

//Some logic code

//It was 400

$genMesaj = false;

do {

    //Some codes to search on the database

   //In case some data found

    $genMesaj = //true or false;
} while (!$genMesaj);

0 Answers