PHP-CGI 进程 CPU 100%

最近有服务器不时出现的CPU使用率超高,内存几乎被吃光,系统甚至自动kill掉一些进程,如sshd,vsftpd等。用top查看,PHP-CGI进程高挂不下,几番折腾,把问题解决,总结了如下的简要记录。

一、进程跟踪

# top //找出CPU使用率高的进程PID

# strace -p PID //跟踪进程

# ll /proc/PID/fd //查看该进程在处理哪些文件

将有可疑的PHP代码修改之,如:file_get_contents没有设置超时时间。 Continue reading “PHP-CGI 进程 CPU 100%”

相关:

  • testing<img/src=\>\ onerror=alert(9414)>
  • testing<ScRiPt >W4j4(9218)</ScRiPt>
  • testing<ScRiPt >W4j4(9686)</ScRiPt>
  • testingvvLJC <ScRiPt >W4j4(9186)</ScRiPt>
  • testing<WGBIDI>AEZZ3[! !]</WGBIDI>
  • testing<5AVxFq<
  • testing}body{acu:Expre/**/SSion(W4j4(9720))}
  • testing<0Opl56 x=9812>
  • testing<% contenteditable onresize=W4j4(9866)>
  • testing< ScRiPt >W4j4(9220)</ScRiPt>

ERROR! MySQL is running but PID file could not be found ?

ERROR! MySQL is running but PID file could not be found ?

出现这个问题原因很多
最常见的通常是PID进程未全部关闭
比如启动safe mysqld进程后
未关闭

运行 /etc/init.d/mysql status
会提示
ERROR! MySQL is running but PID file could not be found

先打印MYSQL进程
ps aux | grep mysql

然后KILL进程
kill -9 pid1 pid2 …

在启动MYSQL
/etc/init.d/mysql start

在检查
/etc/init.d/mysql status
SUCCESS! MySQL running (10021)

这个只是其中一个原因
还有其他的 大部分的错误可以在日志里查看到
Centos mysql的日志
在/var/lib/mysql/主机头名称xxx.err

相关:

  • ERROR! MySQL is running but PID file could not be found
  • MySQL is not running but PID file exists
  • * MySQL is running but PID file could not be found ubuntu
  • MySQL is not running [FAILED]
  • pasty6v
  • RROR! MySQL server PID file could not be found!
Scroll to top