对一张特定图像的请求以 502 bad gateway and proxy 错误结束
我在 Windows 虚拟服务器上运行基于 Ruby on Rails 的应用程序 Redmine(基于 BitNami redmine 包)。它运行 Apache、Mongrel、Ruby 和 Rails。
当我在一个 HTML 页面中构建模板时,我请求一个名为 /templates/mytemplate/images/bkg.jpg
的静态图像资源 - 大约 15 KB 大 - 我得到一个 502关于三分之二的请求的错误网关错误。 x
(来源:pekkagaiser.com)
Apache的错误然后 log 包含
on Apr 12 22:50:33 2010] [error] (620018)APR does not understand this error code:
proxy: pass request body failed to 127.0.0.1:3001 (127.0.0.1)
[Mon Apr 12 22:50:33 2010] [error] proxy: pass request body failed to 127.0.0.1:3001
(127.0.0.1) from 78.34.240.113 ()
It's only for that one resources.其他更大的图像和 CSS 样式表每次都能毫无问题地加载。
奇怪的是,只有当图像用作 CSS 样式表中的背景图像时才会发生这种情况。即使缓存关闭,在浏览器中重复直接访问图像也可以正常工作。这可能是引用者问题吗?但我看不出如何。
我对 Ruby 和 Rails 知之甚少。谁能告诉我这可能是什么以及我应该看哪里?
更新:再想一想,这可能属于服务器故障。如果你也有同样的想法,请移走。
I have the Ruby on Rails-based application Redmine (based on the BitNami redmine package) running on a Windows virtual server. It runs Apache, Mongrel, Ruby, and rails.
When, in a HTML page I am building a template for, I request a static image resource named /templates/mytemplate/images/bkg.jpg
- around 15 kilobytes big - I get a 502 Bad gateway
error about two out of three requests. x
(source: pekkagaiser.com)
Apache's error log then contains
on Apr 12 22:50:33 2010] [error] (620018)APR does not understand this error code:
proxy: pass request body failed to 127.0.0.1:3001 (127.0.0.1)
[Mon Apr 12 22:50:33 2010] [error] proxy: pass request body failed to 127.0.0.1:3001
(127.0.0.1) from 78.34.240.113 ()
It's only for that one resource. Other, much larger images and CSS style sheets get loaded every time without problems.
Oddly, this will happen only if the image is used as a background image in a CSS style sheet. Repeated direct access tol the image in the browser works fine, even with the cache turned off. Could this be a referer problem? But I can't see how.
I know very little about Ruby nor Rails. Can anybody tell me what this could be and where I should look?
Update: On second thought, this might belong on serverfault. Migrate away if you think the same.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我重新安装了 Rails,问题就解决了。
I reinstalled Rails and that sorted it out.