签到数据过大是否影响查询
最近回复积分排行的时候总是提示“该公众号暂时无法提供服务,请稍后再试”,其他都正常,查询了一下目前签到的积分记录大约10000左右,在发送这条指令的时候 top显示mysql cpu占用100%
5条回复
你服务器性能只能说太差了。。。。
哎
mysql> show processlist;
+-----+-----------+-----------------+---------+---------+------+--------------+- -------------------------------------------------------------------------------- ---------------------+
| Id | User | Host | db | Command | Time | State | Info |
+-----+-----------+-----------------+---------+---------+------+--------------+- -------------------------------------------------------------------------------- ---------------------+
| 197 | gateway00 | localhost:34773 | gateway | Query | 415 | Sending data | SELECT SQL_CALC_FOUND_ROWS wut.*, wct.credit FROM wp_weixin_users wut LEFT JOIN wp_weixin_credits w |
| 201 | gateway00 | localhost:34786 | gateway | Query | 409 | Sending data | SELECT SQL_CALC_FOUND_ROWS wut.*, wct.credit FROM wp_weixin_users wut LEFT JOIN wp_weixin_credits w |
| 202 | gateway00 | localhost:34793 | gateway | Query | 404 | Sending data | SELECT SQL_CALC_FOUND_ROWS wut.*, wct.credit FROM wp_weixin_users wut LEFT JOIN wp_weixin_credits w |
| 213 | root | localhost | NULL | Query | 0 | NULL | show processlist |
+-----+-----------+-----------------+---------+---------+------+--------------+- -------------------------------------------------------------------------------- ---------------------+
4 rows in set (0.00 sec)
前三个SQL把mysql给搞崩溃了
所以说你的服务器太低下了,你这个号有多少粉丝啊?
1000+,但都比较活跃,每天80%的粉丝会进行签到,然后进行相关的查询,服务器阿里云CentOS6.5 64位CPU:1核 内存: 1024 MB 军哥LNMP
一核。。。 去弄个双核4G的机器把数据库分开放
我要回复
暂时不支持网页回复,请安装