What should I do if the server CPU runs full?

The CPU is the core of the server. No matter what tasks we process, we need the CPU to complete it. Once the CPU is full, our server will freeze or even crash and cannot connect. If our server often has a full CPU , how to deal with it?

Confirm the cause of the full CPU

If we remote to the server and find that the operation is stuck, we can check whether the CPU usage is normal. If it is a windows system, then we can check it through the performance in the task management or through some security software. If it is linux system, you can command to check, or you can check through some installed software, such as installing pagoda software. Once we find that the CPU is abnormal or it is running full, then we need to analyze what caused it, first of all, we can analyze it by checking which process takes up a lot of CPU.

1. Self-service leads to

For example, if our website application is created with phpstudy in the server, then we check the CPU usage and find that the process occupancy rate is very high. There are two situations where the CPU usage is high. One is that the website code makes mistakes and the program The CPU has been running all the time and the CPU is high. One is that the development of your own business leads to an increase in the number of visits and the CPU load is not high. If the code is wrong, then the website developer needs to carefully check and optimize the code. If it is caused by the rapid development of your own business , it is advocated to upgrade the equipment in time.

2. Poisoning (being attacked) leads to

If we check the process and find that it is an unknown process or a fake process, then it can basically be determined that it is poisoned. If the CPU is found to be full due to poisoning, the emergency treatment is to close the process immediately and use anti-virus tools at the same time. For virus killing, you can also check whether your own data files exist or not, unknown folders and files. The suggestion is that if the poisoning does not affect your own business, it is best to reinstall the system. Here is the use of your own server. it's the best.

3. There are two reasons why the CPU is full when only the website program is running on the server.

Top 1: The concurrent access to the website is high, and the server equipment is not enough, causing the CPU to run full.

Second: Being attacked by CC causes the CPU to run full.

Insufficient server equipment can be solved by upgrading the equipment, so how should the website be solved by CC?

At this time, you can use the high-defense CDN. The following is the function of the high-defense CDN.

1. Hide the IP address of the website server, improve the security of the website server, and prevent the website server from targeted attacks.

2. Accelerate the access speed of the website, intelligent dns node allocation, visitors visiting the website will automatically connect to the node with the fastest response speed.

3. Static and dynamic cache acceleration, reducing the pressure of visitor visits, even in the face of high concurrency, it will not affect website visits.

Guess you like

Origin blog.csdn.net/XiaoYiLiangZai/article/details/124449130