apache2如何跟踪SIGTERM的调用者

apache2如何跟踪SIGTERM的调用者

我在 virtualbox win7pro 主机上有一个 dex x64。我的 apache2 在页面请求或其他活动(例如通过 ftp 上传)后会停止响应。php.cgi 变得无响应,需要重新启动。如能帮助追踪发送 SIGTERM 的罪魁祸首,我将不胜感激。谢谢 Art

我的 apache2.conf 有

<IfModule mpm_prefork_module>
ServerLimit 1024
StartServers 10
MinSpareServers 10
MaxSpareServers 20
MaxClients 1024
MaxRequestsPerChild 0
</IfModule> `

从 apache2 日志中我

[Wed Jun 20 05:07:01 2012] [notice] caught SIGTERM, shutting down [Wed Jun 20 05:07:03 2012] [notice] FastCGI: process manager initialized (pid 4369) [Wed Jun 20 05:07:03 2012] [notice] Apache/2.2.16 (Debian) mod_fastcgi/2.4.6 PHP/5.3.3-7+squeeze13 with Suhosin-Patch mod_perl/2.0.4 Perl/v5.10.1 configured -- resuming normal operations

并从 lastcomm 的会计输出中

php.cgi                www-data __         0.13 secs Wed Jun 20 04:49
lastcomm               root     pts/2      0.10 secs Wed Jun 20 04:49
php.cgi                www-data __         0.18 secs Wed Jun 20 04:49
php.cgi                www-data __         0.18 secs Wed Jun 20 04:47
apache2                root     pts/1      0.02 secs Wed Jun 20 04:46
tput                   root     pts/1      0.00 secs Wed Jun 20 04:46
apache2           F    root     pts/1      0.00 secs Wed Jun 20 04:46
apache2ctl             root     pts/1      0.00 secs Wed Jun 20 04:46
apache2          S     root     pts/1      0.77 secs Wed Jun 20 04:46
rm                     root     pts/1      0.01 secs Wed Jun 20 04:46
install                root     pts/1      0.01 secs Wed Jun 20 04:46
mkdir                  root     pts/1      0.00 secs Wed Jun 20 04:46

apache2ctl        F    root     pts/1      0.00 secs Wed Jun 20 04:46
sleep                  root     pts/1      0.00 secs Wed Jun 20 04:46
apache2          SF    root     __         0.54 secs Wed Jun 20 04:34
apache2          SF    www-data __         0.14 secs Wed Jun 20 04:34
apache2          SF    www-data __         0.07 secs Wed Jun 20 04:34
apache2          SF    www-data __         0.06 secs Wed Jun 20 04:36
apache2          SF    www-data __         0.07 secs Wed Jun 20 04:34
apache2          SF    www-data __         0.11 secs Wed Jun 20 04:34
apache2          SF    www-data __         0.02 secs Wed Jun 20 04:34
apache2          SF    www-data __         0.04 secs Wed Jun 20 04:34
apache2          SF    www-data __         0.06 secs Wed Jun 20 04:34
apache2          SF    www-data __         0.08 secs Wed Jun 20 04:34
apache2          SF    www-data __         0.03 secs Wed Jun 20 04:34
apache2          SF    www-data __         0.02 secs Wed Jun 20 04:34
apache2          SF    www-data __         0.01 secs Wed Jun 20 04:34
grep                   root     pts/1      0.00 secs Wed Jun 20 04:46
apache2ctl             root     pts/1      0.02 secs Wed Jun 20 04:46
apache2                root     pts/1      0.24 secs Wed Jun 20 04:46
apache2          SF    www-data __         0.00 secs Wed Jun 20 04:34
apache2ctl        F    root     pts/1      0.00 secs Wed Jun 20 04:46
apache2ctl             root     pts/1      0.00 secs Wed Jun 20 04:46
apache2                root     pts/1      0.22 secs Wed Jun 20 04:46
apache2ctl        F    root     pts/1      0.01 secs Wed Jun 20 04:46
apache2           F    root     pts/1      0.00 secs Wed Jun 20 04:46
grep                   root     pts/1      0.00 secs Wed Jun 20 04:46
tr                     root     pts/1      0.00 secs Wed Jun 20 04:46
pidof            S     root     pts/1      0.11 secs Wed Jun 20 04:46
cat                    root     pts/1      0.00 secs Wed Jun 20 04:46
apache2           F    root     pts/1      0.00 secs Wed Jun 20 04:46
grep                   root     pts/1      0.00 secs Wed Jun 20 04:46
tr                     root     pts/1      0.00 secs Wed Jun 20 04:46
pidof            S     root     pts/1      0.05 secs Wed Jun 20 04:46
cat                    root     pts/1      0.01 secs Wed Jun 20 04:46
apache2           F    root     pts/1      0.00 secs Wed Jun 20 04:46
apache2ctl             root     pts/1      0.00 secs Wed Jun 20 04:46
apache2                root     pts/1      0.34 secs Wed Jun 20 04:46
apache2ctl        F    root     pts/1      0.00 secs Wed Jun 20 04:46
apache2           F    root     pts/1      0.00 secs Wed Jun 20 04:46
apache2           F    root     pts/1      0.00 secs Wed Jun 20 04:46
smbd             SF    root     __         0.25 secs Wed Jun 20 04:46
php.cgi                www-data __         0.14 secs Wed Jun 20 04:45
php.cgi                www-data __         0.19 secs Wed Jun 20 04:42
cron             SF    root     __         0.02 secs Wed Jun 20 04:39
sh               S     root     __         0.00 secs Wed Jun 20 04:39
find                   root     __         0.00 secs Wed Jun 20 04:39
maxlifetime            root     __         0.02 secs Wed Jun 20 04:39
php5                   root     __         0.13 secs Wed Jun 20 04:39
which                  root     __         0.00 secs Wed Jun 20 04:39
exim4            S     root     __         0.01 secs Wed Jun 20 04:37
php.cgi                www-data __         0.04 secs Wed Jun 20 04:36
php.cgi                www-data __         0.12 secs Wed Jun 20 04:35
php.cgi                www-data __         0.11 secs Wed Jun 20 04:35
php.cgi                www-data __         0.14 secs Wed Jun 20 04:34
lastcomm               root     pts/2      0.09 secs Wed Jun 20 04:34
apache2                root     pts/1      0.02 secs Wed Jun 20 04:34
tput                   root     pts/1      0.00 secs Wed Jun 20 04:34
apache2           F    root     pts/1      0.00 secs Wed Jun 20 04:34
apache2ctl             root     pts/1      0.00 secs Wed Jun 20 04:34
apache2          S     root     pts/1      0.54 secs Wed Jun 20 04:34
rm                     root     pts/1      0.00 secs Wed Jun 20 04:34
install                root     pts/1      0.00 secs Wed Jun 20 04:34
mkdir                  root     pts/1      0.00 secs Wed Jun 20 04:34
apache2ctl        F    root     pts/1      0.00 secs Wed Jun 20 04:34
sleep                  root     pts/1      0.00 secs Wed Jun 20 04:34
apache2          SF    root     __         0.80 secs Wed Jun 20 03:58
sleep                  root     pts/1      0.00 secs Wed Jun 20 04:34
apache2          SF    www-data __         0.26 secs Wed Jun 20 03:58
apache2          SF    www-data __         0.12 secs Wed Jun 20 03:59
apache2          SF    www-data __         0.13 secs Wed Jun 20 03:58
apache2          SF    www-data __         0.13 secs Wed Jun 20 03:59
apache2          SF    www-data __         0.15 secs Wed Jun 20 03:58
apache2          SF    www-data __         0.18 secs Wed Jun 20 03:58
apache2          SF    www-data __         0.07 secs Wed Jun 20 04:21
apache2          SF    www-data __         0.18 secs Wed Jun 20 03:58
apache2          SF    www-data __         0.17 secs Wed Jun 20 03:58
apache2          SF    www-data __         0.30 secs Wed Jun 20 03:58
apache2          SF    www-data __         0.09 secs Wed Jun 20 03:58
apache2          SF    www-data __         0.02 secs Wed Jun 20 04:13

答案1

SIGTERM 很可能是重启操作。根据您的日志,服务器使用 SIGTERM 关闭,然后重新启动。

但这并不能解释服务器卡住的原因。

我认为 SIGTERM 不是您应该寻找的。

相关内容