Zope / Plone 出现间歇性 502 代理错误“从远程服务器读取状态行时出错”

发布于 2025-01-02 10:38:38 字数 1546 浏览 1 评论 0原文

我们目前在 Zope 的一个实例上运行 Plone 3.3.6,在 Apache 2.2 后面有 4 个线程。我们有许多子站点,全部由一个 Plone 站点进行管理。

我目前正在测试一个新设置,运行 2 个 Zope 实例,每个实例 2 个线程,并由 Apache 进行负载平衡。我们有一个工具可以抓取我们的网站来检查错误,该工具报告了许多 502 代理错误。它在我们的实时站点上运行良好,通常也在我们的测试站点上运行良好。

正如预期的那样,我们在 Apache 访问日志中看到 502 错误。

10.10.11.1 - - [04/Feb/2012:14:34:46 +0000] "GET /family-strengthening HTTP/1.1" 502 345 "-" "Mozilla"

我们还在 Apache 错误日志中获得一个条目

[Sat Feb 04 14:34:46 2012] [error] [client 10.10.11.1] proxy: error reading status line from remote server dev:18082
[Sat Feb 04 14:34:46 2012] [error] [client 10.10.11.1] proxy: Error reading from remote server returned by /family-strengthening

有时,Zope 访问日志显示请求有 200 个响应,但服务字节数为 0

./instance2-Z2.log:10.10.11.4 - Anonymous [04/Feb/2012:14:34:47 +0100] "GET /VirtualHostBase/http/test.street-children.org.uk:80/sos/soschildrensvillages_org_uk/street-children_org_uk/VirtualHostRoot/family-strengthening HTTP/1.1" 200 0 "" "Mozilla"

其他时候,该请求不会显示在 Zope 访问日志中。

Zope 实例日志中没有错误。

当我通过浏览器请求相同的页面时,我从未收到错误。再次运行我们的蜘蛛会导致类似数量的 502 错误,但页面不同。

我认为我们站点的 Apache 配置非常标准:

ProxyPreserveHost On
<Proxy balancer://zopes>
  BalancerMember http://dev:18081
  BalancerMember http://dev:18082
</Proxy>
RewriteRule ^/(.*) balancer://zopes/VirtualHostBase/http/%{SERVER_NAME}:80/sos/soschildrensvillages_org_uk/%{ENV:SOS_PLONE_FOLDER_SHORTNAME}/VirtualHostRoot/$1 [last,proxy]

我不知道从哪里开始尝试调试它,因此我们将不胜感激。

We're currently running Plone 3.3.6 on one instance of Zope with 4 threads behind Apache 2.2. We have a number of subsites all managed from one Plone site.

I'm currently testing a new set-up running 2 Zope instances, 2 threads each, and load balanced by Apache. We have a tool that spiders our sites to check for errors and this is reporting a number of 502 proxy errors. It runs fine on our live sites and usually also on our test sites.

As expected we see a 502 error in the Apache access log.

10.10.11.1 - - [04/Feb/2012:14:34:46 +0000] "GET /family-strengthening HTTP/1.1" 502 345 "-" "Mozilla"

We also get an entry in the Apache error log

[Sat Feb 04 14:34:46 2012] [error] [client 10.10.11.1] proxy: error reading status line from remote server dev:18082
[Sat Feb 04 14:34:46 2012] [error] [client 10.10.11.1] proxy: Error reading from remote server returned by /family-strengthening

Sometimes Zope access log shows the request with 200 response but with 0 bytes served

./instance2-Z2.log:10.10.11.4 - Anonymous [04/Feb/2012:14:34:47 +0100] "GET /VirtualHostBase/http/test.street-children.org.uk:80/sos/soschildrensvillages_org_uk/street-children_org_uk/VirtualHostRoot/family-strengthening HTTP/1.1" 200 0 "" "Mozilla"

Other times the request does not show up in the Zope access log.

There are no errors in the Zope instance logs.

When I request the same pages through a browser I never receive the error. Running our spider again results in a similar number of 502 errors but for different pages.

I think our Apache configuration for our sites is pretty standard:

ProxyPreserveHost On
<Proxy balancer://zopes>
  BalancerMember http://dev:18081
  BalancerMember http://dev:18082
</Proxy>
RewriteRule ^/(.*) balancer://zopes/VirtualHostBase/http/%{SERVER_NAME}:80/sos/soschildrensvillages_org_uk/%{ENV:SOS_PLONE_FOLDER_SHORTNAME}/VirtualHostRoot/$1 [last,proxy]

I don't know where to start trying to debug this so any help would be much appreciated.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

記憶穿過時間隧道 2025-01-09 10:38:38

更新

以为我可以通过停止 Apache 然后启动 Apache 来解决这个问题

apachectl stop
apachectl start

问题在测试系统上消失了,只有在我切换到两个 Zopes 后才会出现那里。

我一直在优雅地重新启动 Apache。每次我们优雅地重新启动时,我们的 apache 错误日志中也会出现如下错误,

[Tue Feb 07 19:41:07 2012] [error] proxy: ap_get_scoreboard_lb(97) failed in child 411 for worker http://dev:18081
[Tue Feb 07 19:41:07 2012] [error] proxy: ap_get_scoreboard_lb(99) failed in child 411 for worker http://dev:18082

我读到这些是无害的,但也许不是?它们不再出现在停止/启动后的正常重启中

Update

I thought I'd resolved this by doing an Apache stop and then Apache start

apachectl stop
apachectl start

The problem went away on the test system only to appear on live once I switched to two Zopes there.

I had been restarting Apache gracefully. We had also been getting errors like the following in our apache error log every time we gracefully restarted

[Tue Feb 07 19:41:07 2012] [error] proxy: ap_get_scoreboard_lb(97) failed in child 411 for worker http://dev:18081
[Tue Feb 07 19:41:07 2012] [error] proxy: ap_get_scoreboard_lb(99) failed in child 411 for worker http://dev:18082

I had read that these were harmless but maybe not? They no longer appear on graceful restart after the stop / start

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文