升级后,21号参加站长大会后, MySQL 服务进程 (mysqld-nt.exe) CPU 占用率总为 100% 高居不下
发现在后台更新文章后,几个人同时更新
整站生成静态页面,同时生成超过5个,就会产生100%CPU占用,我用的是独立的服务器,2G内存,4CPU
访问量不大
太郁闷了,网站没法访问了,还怕机器挂掉,在线等啊
上服务器看MySQL进程信息如下
mysql> show processlist
-> ;
+------+--------+----------------+--------+---------+------+----------------+---
--------------------------------------------------------------------------------
-------------------+
| Id | User | Host | db | Command | Time | State | In
fo
|
+------+--------+----------------+--------+---------+------+----------------+---
--------------------------------------------------------------------------------
-------------------+
| 4149 | root | localhost:3652 | NULL | Query | 0 | NULL | sh
ow processlist
|
| 4233 | sq_bbs | localhost:3737 | sq_bbs | Query | 1 | Sorting result | SE
LECT i.* FROM supe_spaceitems i WHERE i.catid IN (1,90,91,92,93,94,95,96,97,98,
99,100,101,102,103 |
| 4237 | sq_bbs | localhost:3741 | sq_bbs | Query | 0 | Sorting result | SE
LECT i.* FROM supe_spaceitems i WHERE i.type='news' AND i.folder=1 AND i.grade
IN (5) AND i.picid |
| 4242 | sq_bbs | localhost:3746 | sq_bbs | Sleep | 0 | | NU
LL
|
| 4244 | sq_bbs | localhost:3748 | sq_bbs | Sleep | 0 | | NU
LL
|
| 4245 | sq_bbs | localhost:3749 | sq_bbs | Query | 1 | Sorting result | SE
LECT i.* FROM supe_spaceitems i WHERE i.type='news' AND i.folder=1 AND i.grade
IN (5) AND i.picid |
| 4248 | sq_bbs | localhost:3752 | sq_bbs | Sleep | 0 | | NU
LL
|
| 4250 | sq_bbs | localhost:3754 | sq_bbs | Sleep | 7 | | NU
LL
|
| 4255 | sq_bbs | localhost:3759 | sq_bbs | Sleep | 5 | | NU
LL
|
| 4259 | sq_bbs | localhost:3763 | sq_bbs | Sleep | 0 | | NU
LL
|
| 4260 | sq_bbs | localhost:3764 | sq_bbs | Sleep | 4 | | NU
LL
|
| 4262 | sq_bbs | localhost:3766 | sq_bbs | Sleep | 2 | | NU
LL
|
| 4265 | sq_bbs | localhost:3769 | sq_bbs | Sleep | 1 | | NU
LL
|
| 4266 | sq_bbs | localhost:3770 | sq_bbs | Sleep | 0 | | NU
LL
|
| 4267 | sq_bbs | localhost:3771 | sq_bbs | Sleep | 0 | | NU
LL
|
+------+--------+----------------+--------+---------+------+----------------+---
--------------------------------------------------------------------------------
-------------------+
15 rows in set (0.08 sec)
mysql> show processlist
-> show processlist
-> ;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use near 'show
processlist' at line 2
mysql> show processlist
-> ;
+------+--------+----------------+--------+---------+------+-------+------------
------+
| Id | User | Host | db | Command | Time | State | Info
|
+------+--------+----------------+--------+---------+------+-------+------------
------+
| 4149 | root | localhost:3652 | NULL | Query | 0 | NULL | show proces
slist |
| 4298 | sq_bbs | localhost:3802 | sq_bbs | Sleep | 4 | | NULL
|
| 4299 | sq_bbs | localhost:3803 | sq_bbs | Sleep | 20 | | NULL
|
| 4302 | sq_bbs | localhost:3806 | sq_bbs | Sleep | 4 | | NULL
|
| 4303 | sq_bbs | localhost:3807 | sq_bbs | Sleep | 19 | | NULL
|
| 4304 | sq_bbs | localhost:3808 | sq_bbs | Sleep | 14 | | NULL
|
| 4306 | sq_bbs | localhost:3810 | sq_bbs | Sleep | 17 | | NULL
|
| 4305 | sq_bbs | localhost:3809 | sq_bbs | Sleep | 9 | | NULL
|
| 4309 | sq_bbs | localhost:3813 | sq_bbs | Sleep | 3 | | NULL
|
| 4310 | sq_bbs | localhost:3814 | sq_bbs | Sleep | 0 | | NULL
|
| 4311 | sq_bbs | localhost:3815 | sq_bbs | Sleep | 14 | | NULL
|
| 4315 | sq_bbs | localhost:3819 | sq_bbs | Sleep | 10 | | NULL
|
| 4317 | sq_bbs | localhost:3821 | sq_bbs | Sleep | 9 | | NULL
|
| 4318 | sq_bbs | localhost:3822 | sq_bbs | Sleep | 9 | | NULL
|
| 4319 | sq_bbs | localhost:3823 | sq_bbs | Sleep | 9 | | NULL
|
| 4321 | sq_bbs | localhost:3825 | sq_bbs | Sleep | 7 | | NULL
|
| 4326 | sq_bbs | localhost:3832 | sq_bbs | Sleep | 0 | | NULL
|
| 4330 | sq_bbs | localhost:3836 | sq_bbs | Sleep | 0 | | NULL
|
| 4329 | sq_bbs | localhost:3835 | sq_bbs | Sleep | 0 | | NULL
|
| 4328 | sq_bbs | localhost:3834 | sq_bbs | Sleep | 0 | | NULL
|
+------+--------+----------------+--------+---------+------+-------+------------
------+
20 rows in set (0.01 sec)
mysql> show processlist
-> ;
+------+--------+----------------+--------+---------+------+----------------+---
--------------------------------------------------------------------------------
-------------------+
| Id | User | Host | db | Command | Time | State | In
fo
|
+------+--------+----------------+--------+---------+------+----------------+---
--------------------------------------------------------------------------------
-------------------+
| 4149 | root | localhost:3652 | NULL | Query | 0 | NULL | sh
ow processlist
|
| 4315 | sq_bbs | localhost:3819 | sq_bbs | Sleep | 1 | | NU
LL
|
| 4318 | sq_bbs | localhost:3822 | sq_bbs | Sleep | 0 | | NU
LL
|
| 4319 | sq_bbs | localhost:3823 | sq_bbs | Sleep | 3 | | NU
LL
|
| 4341 | sq_bbs | localhost:3847 | sq_bbs | Query | 0 | Sorting result | SE
LECT i.* FROM supe_spaceitems i WHERE i.type='news' AND i.folder=1 AND i.grade
IN (5) AND i.picid |
| 4343 | sq_bbs | localhost:3849 | sq_bbs | Sleep | 0 | | NU
LL
|
| 4346 | sq_bbs | localhost:3852 | sq_bbs | Sleep | 6 | | NU
LL
|
| 4352 | sq_bbs | localhost:3858 | sq_bbs | Sleep | 1 | | NU
LL
|
| 4354 | sq_bbs | localhost:3860 | sq_bbs | Sleep | 1 | | NU
LL
|
| 4355 | sq_bbs | localhost:3861 | sq_bbs | Sleep | 0 | | NU
LL
|
| 4356 | sq_bbs | localhost:3862 | sq_bbs | Sleep | 1 | | NU
LL
|
| 4357 | sq_bbs | localhost:3863 | sq_bbs | Sleep | 0 | | NU
LL
|
+------+--------+----------------+--------+---------+------+----------------+---
--------------------------------------------------------------------------------
-------------------+
12 rows in set (0.00 sec)
mysql> |