apache日志中有很多“fetch timed out”错误

时间:2013-06-28 01:32:57

标签: apache2 mod-pagespeed

我已使用下面的配置安装了mod_pagespeed。虽然它运行良好,但我在/var/log/apache2/error.log文件中获得了大量输出,我不知道如何解决。

配置

ModPagespeed on
AddOutputFilterByType MOD_PAGESPEED_OUTPUT_FILTER text/html
ModPagespeedFileCachePath "/var/mod_pagespeed/cache/"
ModPagespeedEnableFilters combine_css,rewrite_css,inline_css
ModPagespeedEnableFilters combine_javascript,rewrite_javascript,inline_javascript
ModPagespeedEnableFilters extend_cache
ModPagespeedEnableFilters rewrite_images
ModPagespeedEnableFilters collapse_whitespace
ModPagespeedEnableFilters remove_comments
ModPagespeedEnableFilters elide_attributes
ModPagespeedRateLimitBackgroundFetches on

错误

[Fri Jun 28 13:29:15 2013] [error] [mod_pagespeed 1.4.26.3-3101 @31464] Serf status 120105(APR does not understand this error code) polling for 30 threaded fetches for 0.05 seconds
[Fri Jun 28 13:29:15 2013] [error] [mod_pagespeed 1.4.26.3-3101 @31464] Serf status 120105(APR does not understand this error code) polling for 30 threaded fetches for 0.05 seconds
[Fri Jun 28 13:29:15 2013] [error] [mod_pagespeed 1.4.26.3-3101 @31464] Serf status 120105(APR does not understand this error code) polling for 30 threaded fetches for 0.05 seconds
[Fri Jun 28 13:29:15 2013] [warn] [mod_pagespeed 1.4.26.3-3101 @31464] Fetch timed out: http://IP_ADDRESS:443/img/icon/arrow-right-5x8.png (30) waiting for 50 ms
[Fri Jun 28 13:29:15 2013] [warn] [mod_pagespeed 1.4.26.3-3101 @31464] Fetch timed out: http://IP_ADDRESS:443/img/layout/navbar-divider.png (29) waiting for 50 ms
[Fri Jun 28 13:29:15 2013] [warn] [mod_pagespeed 1.4.26.3-3101 @31464] Fetch timed out: http://IP_ADDRESS:443/img/layout/navbar-label.png (28) waiting for 50 ms
[Fri Jun 28 13:29:15 2013] [warn] [mod_pagespeed 1.4.26.3-3101 @31464] Fetch timed out: http://IP_ADDRESS:443/img/layout/portal-icon.png (27) waiting for 50 ms

1 个答案:

答案 0 :(得分:7)

默认情况下,mod_pagespeed将使用http获取css / js / images。如果Web服务器在50ms内没有响应(默认情况下),它将中止请求,并记录您看到的超时消息。

然而,似乎还有另一个问题:Serf状态120105表示收到了错误的响应。您可能想要调查apache日志,也许您可​​以找到有关正在发生的事情的线索。我不认为这些消息与mod_pagespeed有关,在这种情况下它只是信使。

为了摆脱这些消息,我建议您将pagespeed配置为从磁盘加载文件[1],使用 ModPagespeedLoadFromFile 和朋友来解决这些消息,并带来以下其他好处:

  • 可能要快得多
  • 通过避免回送请求消耗较少的Web服务器资源
  • 将立即处理对css / js / images的更改

[1] https://developers.google.com/speed/pagespeed/module/domains