Answer the question
In order to leave comments, you need to log in
The running php script from the console eats up a lot of memory, why?
Script Code
<?php
sleep(10);
die();
?>
for($i=0;$i<100;$i++){
system("php7 ../../web/console.php > /dev/null &");
}
Answer the question
In order to leave comments, you need to log in
RAM eats not sleep, but running processes of PHP interpreters in the amount of 100 pieces.
To confirm my words, you can open htop, and in the next window execute: (launch php interactive mode in the background 100 times) for i in {1..100}; do php -a & done;
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question