Alternative reasons for PHP CGI process CPU caused by excessive CPU usage reaches 100%

    Since the CDN acceleration Huawei cloud use, and found my Ali cloud server suddenly Caton, the page opens very slow. Log Huawei cloud CDN management background found the highest bandwidth 30M, reached more than 10GB traffic in a short time, so much traffic my server definitely could not carry ah. So also with Huawei cloud had forced a tear, then decisively abandoned Huawei cloud.

But after the replacement of other CDN or WAF, CPU occupancy remains high, the Internet to find a lot of ways do not work.

I looked under the PHP CGI is the most CPU-intensive process, and have been tested and found to be browser kernel detection site PHP CGI occupy the highest, the other rarely. But look at third-party sites statistics, and there is not much traffic ah.

So I exclude using the following steps:

The first step, taking up the most CPU suspended website , and soon found that the CPU usage down. That is certainly the reason for this site, but I have not recently updated website code ah, bug infinite loop like there should be no cause CPU intensive;

The second step, I followed all the pages of the investigation , the examination found to be linked to horse or black phenomenon;

The third step, the ie.icoa.cn resolve to a new directory, and place a static html home . It found that the site can be a normal visit, but did not take up too much CPU situation;

The fourth step is to test whether PHP is running normally , the html page into a php page, the tests are normal, CPU normal;

The fifth step, copy the original site to the new site home directory, all the normal tests. When I thought no problem, the entire site copied to the new directory site, high CPU utilization occurs immediately . Then I think this case is certainly not due to normal access caused because just restore access to, and will not have so much normal access. Personal guess is definitely a reptile crawl, and no bottom line crawled exhausted resources;

The sixth step, all pages will be deleted, and then a page a page to copy files in the new directory site , and finally when I copied the latest UA record on this page, CPU immediately burst table. Solve the case, and certainly someone wants to UA data, then use the latest climb reptiles UA record I open a page.

After the seventh step, I removed the new UA record page, CPU usage back to normal .

So to find the cause, not the bottom line is that some reptiles, crawl frequency is too high, I run out of server resources. Sorry you do this, I had to let you climb!

Guess you like

Origin www.cnblogs.com/68xi/p/11518984.html