"Help" PHP sleep () causes all pages to be unresponsive.
Environment is LNMP, I wrote in the code
Sleep (60);
Open that page, 60 seconds before the output, this is normal;
But in these 60 seconds the other pages in my site are also loading, until this page appears,
Other pages appear ...
Then I in the code, the empty loop 10 million times, found that if the page is not finished;
The other pages are also the loading state;
Younger brother used to do Java, just contact PHP soon, this is too strange, please you greatly pointing to the Maze php sleepx
------Solution--------------------
1. Is there a sleep () code in the program? Is there a similar session_start ()? Or you have modified the php.ini to open the session automatically.
If yes, that is the session file lock causes
2. What is the largest child process in your php-fpm? If there is only one, it will also cause congestion.
------Solution--------------------
What is the specific code situation? Is there a for, Forreach loop?
------Solution--------------------
This guessing game is not fun at all.