2

I'm using Rails 3.0.5 version and Ruby 1.9.2 in my application.

Its working fine in development mode but in production mode server goes down after every 3-4 days.

It gives below error in /var/log/https/error.log file.

[Sun Oct 21 09:39:03 2012] [error] [IP_ADDRESS] **Premature end of script headers:** 
[ pid=24971 thr=1 file=ext/apache2/Hooks.cpp:817 time=2012-10-21 09:39:03.371 ]:

The backed application (process 29805) 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.

I am not getting what's the reason for server down.

NoNaMe
  • 6,020
  • 30
  • 82
  • 110
Dipali Nagrale
  • 510
  • 5
  • 17

2 Answers2

0

which server your using? webrick or else? i got some problem like this in past that server goes down. i changed server from webrick to Mongrel its faster then webrick

0

Sorry i can't comment so answering, personally haven't come across this problem but there seems to be quite some talk about it. Here are a few resources that i came across:

  1. Dalibor Nasevic's explanation as to why this is happening
  2. Premature end of script headers — Rails
  3. Intermittent “premature end of script headers” with Rails 3.1

Hope it helps.

Community
  • 1
  • 1
Phoenix
  • 192
  • 1
  • 8
  • Thanks for your response. I read all links and also implement the solutions but still this is not helpful for me.. – Dipali Nagrale Oct 23 '12 at 08:15
  • I am getting problem in memory leak. How can i trace this issue? – Dipali Nagrale Oct 26 '12 at 06:16
  • I'm sorry for the late reply. Can you please elaborate on the question. If you want to check for memory patterns of your application checkout this [related question](http://stackoverflow.com/questions/161315/ruby-ruby-on-rails-memory-leak-detection). Hope it helps :) – Phoenix Oct 29 '12 at 06:13
  • K turns out all the suggestions in the above mentioned link are dead. There is one more [Perftools.rb](https://github.com/tmm1/perftools.rb). – Phoenix Oct 29 '12 at 06:44