有时候apache会疯掉,吃掉我所有的记忆和交换,但是我不知道如何找出哪个网页应用程序导致它。
ps给了我这个过程的输出; “不间断的睡眠(通常是IO)”
www-data 1526 0.1 78.9 14928852 3191628 ? D Oct17 6:45 /usr/sbin/apache2 -k start
我怀疑Ruby + Redmine,但我想确定
确保在你的apache模块中加载了mod_status.so然后在httpd.conf中查找/添加上面的代码:
# Uncomment the following lines to enable mod_status support: # ExtendedStatus On <Location /server-status> SetHandler server-status Order Deny,Allow Deny from all Allow from YOUR_IP_HERE </Location>
这将允许您查看您的http服务器中正在使用的加载域的所有页面。
要访问它,请使用http:// your_ip / server-status ,只有在Allow from YOUR_IP_HERE定义的IP才能查看它。
lsof -p会显示你正在等待的文件句柄。 此外strace -p和ltrace -p可能会很方便地尝试debugging它。