简体   繁体   English

PHP mysql连接帮助(ubuntu LAMP服务器)

[英]PHP mysql connections help ( ubuntu LAMP server)

So last night I had a cpu spike for 100% for 30 minutes which made the server not very usable :-( 因此,昨晚我在30分钟内将CPU峰值提高了100%,这使得服务器不太可用:-(

The server doesn't seem to be the quickest even today (its running on Amazon cloud!). 即使在今天,该服务器似乎也不是最快的(它在Amazon云上运行!)。

The application is a chat application which only has about registered 5 users who's client polls a php script every every 5 seconds for new information ( each request hits mysql). 该应用程序是一个聊天应用程序,只有大约5个注册用户,其客户端每5秒钟轮询一次php脚本以获取新信息(每个请求都命中mysql)。

Running some commands I found on the net it returned that I have 200 thousand connections - is this active or since the server was up? 运行我在网上发现的一些命令后,它返回了20万个连接-这是活动的还是服务器已启动?

Can anyon offer any advice if there is anything out of the ordinary in the below. 如果以下任何异常之处,任何人都可以提供任何建议。

(Note these stats are from today where there were only 2 users logged in) (请注意,这些统计数据是从今天开始只有2位用户登录的)

在此处输入图片说明

120 thosand connections since your mysql running up. 自从您的mysql运行以来,已有120个thosand连接。 About 100% of cpu. 大约100%的CPU。 Check apache logs in /var/logs/apacheX looking for excessive error messages. 检查/ var / logs / apacheX中的apache日志,查找过多的错误消息。 It can be the server slow. 可能是服务器运行缓慢。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM