Does sleeping script will be counted in Entry Processes?

62 views Asked by At

I'm developing Dating Website with messaging feature. Message Controller script sleeps for a second to check for new Message. But my hosting provider has allowed me 20 Entry Processes. So,

  1. Does sleeping script will be counted in Entry Processes?
  2. if there are more than 20 users then will the limit be reached and I'll have limit resource error?

If the answer is YES. Then how do I achieve same goal within this limit?

Sample Code:

...
while($isNewMessage) {
   $isNewMessage = $model->checkNewMessage();
   sleep($this->sleepTime); //1 second
 }
...
0

There are 0 answers