当前位置:网站首页>A troubleshooting of website crash due to high CPU
A troubleshooting of website crash due to high CPU
2022-06-26 04:21:00 【Scholar and】
problem : The website has been circling and can't be accessed
screening :
1: Log in to alicloud to view the server status , According to the normal 【 Running 】
2: View Alibaba cloud servers 【 Monitoring information 】 Show cpu The usage rate is as high as 60%
3:Xshell Connect to server using 【top】 Command view cpu Usage display 【mysql Occupy cpu the height is 280%】
4: Use navicat Connect to the database using 【show full processlist;】 command , List all in progress sql sentence
6: Through analysis, it is found that there are a large number of slow statements with long execution time
Conclusion :
1:sql The statement execution is too slow and needs to be optimized
2: The size of the temporary table is too low and needs to be reallocated
Emergency treatment :
Use mysql【kill id;】 The command kills the executing thread
Final treatment :
1: Re optimize statements , Remove useless linked tables , Precise query conditions
2: Optimize database configuration etc/my.cnf【 There is no need to restart after modification 】
The size of the temporary watch :【tmp_table_size=200M】
Maximum upper limit of temporary table :【max_heap_table_size=200M】
join Join table query cache performance :【join_buffer_size=8M】
mysql Query result annotation :
Id: Connect mysql Server threads id, Can pass kill Kill the thread .
User: Database user connected to the current thread
Host: The user who executed the statement IP
db: Threaded database , If not, it is null
Command: Displays the command executed by the current connection , It's usually dormant or idle (sleep), Inquire about (query), Connect (connect)
Time: When the thread is in its current state , The unit is seconds
State: Shows the... Using the current connection sql The state of the statement
Info: thread-executed sql sentence ( For analysis and troubleshooting sql sentence ), If there is no statement execution null.
边栏推荐
- 【QT】资源文件导入
- [geek challenge 2019] rce me
- Install cenos in the virtual machine
- Modify the number of Oracle connections
- What should I do if the 51 SCM board cannot find the device in keil
- 修改Oracle连接数
- [Qunhui] no port access (reverse proxy + intranet penetration)
- Lua语法讲解
- Spark - 一文搞懂 parquet
- Detailed explanation of globalkey of flutter
猜你喜欢

6、 Project practice --- identifying cats and dogs

The stc-isp burning program for 51 single chip microcomputer always shows that "the target single chip microcomputer is being detected..." the cold start board does not respond
![[Qunhui] no port access (reverse proxy + intranet penetration)](/img/bc/b1e0c5c382e30fbcea28fbc68c1151.jpg)
[Qunhui] no port access (reverse proxy + intranet penetration)

钉钉开放平台-小程序开发实战(钉钉小程序服务器端)

CTF serialization and deserialization

Swagger
![[Qunhui] import certificate](/img/1f/ab63b0556a60b98388b482d70f6156.jpg)
[Qunhui] import certificate

线程同步之条件变量

微软禁止俄用户下载安装Win10/11

Microsoft prohibits Russian users from downloading and installing win10/11
随机推荐
English version of ternary loss
[Qunhui] command line acme SH automatically apply for domain name certificate
捕获数据包(Wireshark)
Nailing open platform - applet development practice (nailing applet client)
Modify the number of Oracle connections
Report on demand situation and development trend of China's OTC industry from 2022 to 2028
Construction of art NFT trading platform | NFT mall
Development prospect and investment strategic planning report of global and Chinese PVC hose industry from 2022 to 2028
Simple personal summary of tp6 multi application deployment -- Part I [original]
PHP splits a string into arrays
六、项目实战---识别猫和狗
What preparation should I make before learning SCM?
MySQL enable logbin in Qunhui docker
NFT creation and binding of BSC and HT chains
win10 系统打开的软件太小,如何变大(亲测有效)
mysql自带的性能测试工具mysqlslap执行压力测试
Syntax error of go language generic in IDE
Install cenos in the virtual machine
Oracle 數據泵導錶
Spark - understand parquet