Apache 2 中什么是“捕获的 SIGWINCH"?错误? [英] What is in Apache 2 a "caught SIGWINCH" error?

查看:43
本文介绍了Apache 2 中什么是“捕获的 SIGWINCH"?错误?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的服务器 (ubuntu 8.04) LAMP 运行 drupal 6,当流量很高时,它停止提供页面.重启apache2不行,必须重启服务.

My server (ubuntu 8.04) LAMP running drupal 6, when there is high traffic, it stops serving pages. A restart of apache2 will not work, so I have to restart the service.

我在 apache2 error.log 中发现了这条消息

I found this message in the apache2 error.log

[notice] 捕捉到 SIGWINCH,正在关闭优雅地放下

[notice] caught SIGWINCH, shutting down gracefully

我还注意到 apache2 的进程 ID 在 apache 停止响应时大约为 12000.

Also I notice that the process id of the apache2, was around 12000 when apache stops responding.

更新

如您所指出的,捕获的 SIGWINCH 是 apache 服务重新启动的通知.我和最大的客户一起玩,并保持活力.我将 MaxClients 设置得太低,因此出现服务器已到达 MaxClients 设置,请考虑提高 MaxClients 设置"错误,但已修复.

The caught SIGWINCH, as you point out, is a notice of the apache service restarting. I played around with the max clients and keep alive. I set the MaxClients too low so I got a "server reached MaxClients setting, consider raising the MaxClients setting" error, but fixed that.

关于 PID,我的安装安装了 prefork 模块,所以在达到 MaxRequestPerChild 后,它会回收子进程.这就是 PID 周期性上升的原因.仍然没有弄清楚为什么一段时间后 apache 停止响应.

Regarding the PID, my installation has prefork module installed, so after MaxRequestPerChild is reached, it recycles the child process. That is why the PID is rising periodically. Still haven't figured out why after a while apache stops responding.

与此同时,将尝试提高 MaxRequestPerChild,因此 PID 不会那么快地达到 PID 最大值.当前限制为 32768(这是新的 debian 和 ubuntu 安装的标准).

In the mean time will try to rise the MaxRequestPerChild so the PID dosen't reach PID max that fast. Current limit is 32768 (which is standard for new debian and ubuntu installations).

以下是日志中的更多内容:

Here is more from the log:

[2009 年 4 月 24 日星期五 01:48:56] [通知]抓住SIGWINCH,关闭优雅地

[Fri Apr 24 01:48:56 2009] [notice] caught SIGWINCH, shutting down gracefully

[2009 年 4 月 24 日星期五 01:50:07] [通知]Apache/2.2.8 (Ubuntu)PHP/5.2.4-2ubuntu5.3 与Suhosin-Patch 已配置——正在恢复正常操作

[Fri Apr 24 01:50:07 2009] [notice] Apache/2.2.8 (Ubuntu) PHP/5.2.4-2ubuntu5.3 with Suhosin-Patch configured -- resuming normal operations

[2009 年 4 月 24 日星期五 17:13:35] [错误][客户端 195.70.62.131] 客户端发送没有主机名的 HTTP/1.1 请求(请参阅RFC2616 第 14.23 节):/w00tw00t.at.ISC.SANS.DFind:)

[Fri Apr 24 17:13:35 2009] [error] [client 195.70.62.131] client sent HTTP/1.1 request without hostname (see RFC2616 section 14.23): /w00tw00t.at.ISC.SANS.DFind:)

[2009 年 4 月 24 日星期五 17:36:00] [错误][客户端 212.188.33.4] 客户端发送没有主机名的 HTTP/1.1 请求(请参阅RFC2616 第 14.23 节):/w00tw00t.at.ISC.SANS.DFind:)

[Fri Apr 24 17:36:00 2009] [error] [client 212.188.33.4] client sent HTTP/1.1 request without hostname (see RFC2616 section 14.23): /w00tw00t.at.ISC.SANS.DFind:)

[2009 年 4 月 25 日星期六 20:05:07] [错误][客户端 84.243.222.12] 中的 URI 无效请求 GET HTTP/1.1 HTTP/1.1

[Sat Apr 25 20:05:07 2009] [error] [client 84.243.222.12] Invalid URI in request GET HTTP/1.1 HTTP/1.1

[2009 年 4 月 25 日星期六 20:05:12] [错误][客户端 84.243.222.12] 脚本不是发现或无法统计:/usr/lib/cgi-bin/twiki

[Sat Apr 25 20:05:12 2009] [error] [client 84.243.222.12] script not found or unable to stat: /usr/lib/cgi-bin/twiki

[2009 年 4 月 25 日星期六 20:05:12] [错误][客户端 84.243.222.12] 脚本不是发现或无法统计:/usr/lib/cgi-bin/wiki

[Sat Apr 25 20:05:12 2009] [error] [client 84.243.222.12] script not found or unable to stat: /usr/lib/cgi-bin/wiki

[2009 年 4 月 25 日星期六 20:05:12] [错误][客户端 84.243.222.12] 脚本不是发现或无法统计:/usr/lib/cgi-bin/wikis

[Sat Apr 25 20:05:12 2009] [error] [client 84.243.222.12] script not found or unable to stat: /usr/lib/cgi-bin/wikis

[2009 年 4 月 25 日星期六 21:46:46] [错误][客户端 211.68.23.167] 中的 URI 无效请求 GET HTTP/1.1 HTTP/1.1

[Sat Apr 25 21:46:46 2009] [error] [client 211.68.23.167] Invalid URI in request GET HTTP/1.1 HTTP/1.1

[2009 年 4 月 26 日星期日 06:13:47] [错误][客户端 86.39.154.89] 客户端发送没有主机名的 HTTP/1.1 请求(请参阅RFC2616 第 14.23 节):/w00tw00t.at.ISC.SANS.DFind:)

[Sun Apr 26 06:13:47 2009] [error] [client 86.39.154.89] client sent HTTP/1.1 request without hostname (see RFC2616 section 14.23): /w00tw00t.at.ISC.SANS.DFind:)

[2009 年 4 月 26 日星期日 06:53:07] [通知]请求正常重启,正在执行重启

[Sun Apr 26 06:53:07 2009] [notice] Graceful restart requested, doing restart

推荐答案

好吧,在 Ubuntu 上启动和停止 Apache 时,在某些情况下会使用 SIGWINCH.如果我在我的 Ubuntu 8.10 服务器上执行 sudo apache2ctl graceful-stop,我会在我的日志中得到这个:

Well, SIGWINCH is used in some situations when starting and stopping Apache on Ubuntu. If I do sudo apache2ctl graceful-stop on my Ubuntu 8.10 server, I get this in my log:

[Fri Apr 24 22:41:15 2009] [notice] caught SIGWINCH, shutting down gracefully

我记得,SIGWINCH 也被一些需要在轮换日志、夜间作业等时重新启动 Apache 的服务使用.

As I remember it, SIGWINCH is also used by some services that need to restart Apache when rotating logs, nightly jobs, etc.

这并不能解释您目前遇到的问题,但我认为可能是您的服务器上正在重新启动 Apache 的其他东西正在运行 - 或者它可能与您的问题根本无关.

That doesn't explain the problem you're currently having, but I think it might be something else running on your server that's restarting Apache – or it might not be related to your problem at all.

如果可以,请尝试发布更多日志文件,这样分析起来会容易得多:)

Try posting more of the logfile if you can, it'll be a lot easier to analyse :)

这篇关于Apache 2 中什么是“捕获的 SIGWINCH"?错误?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆