带乘客的Apache在开发模式下会出现错误(脚本标头过早结束)

时间:2011-12-02 07:11:34

标签: ruby-on-rails apache2 passenger

我正在使用Apache + passenger用于我的rails应用程序,该应用程序在生产模式下正常运行,除非浏览器在开发模式中每2-3次点击后显示错误消息,当我刷新页面时它会消失.I'我在我的铁路应用中使用金属,我认为可能是原因,但不确定这是否是唯一的原因。

浏览器上的错误消息

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, [no address given] and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

本地主机端口80上的Apache / 2.2.16(Ubuntu)服务器

Apache日志错误:

[Thu Dec 01 16:55:23 2011] [error] [client 127.0.0.1] Premature end of script headers: view_transactions, referer: http://localhost/admin_portal/1014978061/view_transactions
[ pid=660 thr=3078097552 file=ext/apache2/Hooks.cpp:822 time=2011-12-01 16:55:23.563 ]: The backend application (process 796) did not send a valid HTTP response; instead, it sent nothing at all. It is possible that it has crashed; please check whether there are crashing bugs in this application.
[ pid=796 thr=-608495398 file=utils.rb:176 time=2011-12-01 11:25:23.878 ]: *** Exception NoMethodError in application (undefined method `new' for Rails:Module) (process 796, thread #<Thread:0xb77631b4>):
from /home/brijendra/aptana_studio_3_workspace/wantsa/vendor/plugins/newrelic_rpm/lib/new_relic/control.rb:467:in `new_instance'
from /home/brijendra/aptana_studio_3_workspace/wantsa/vendor/plugins/newrelic_rpm/lib/new_relic/control.rb:54:in `instance'
from /home/brijendra/aptana_studio_3_workspace/wantsa/vendor/plugins/newrelic_rpm/lib/new_relic/agent.rb:167:in `logger'

如果需要,我会急于发布任何其他输出,并建议解决此问题。

1 个答案:

答案 0 :(得分:0)

我通过在development.rb中将缓存更改为true来修复此错误,并且工作正常。