Click here to Skip to main content
15,892,298 members

My Ruby on rails application server phusion passenger get down frequently, why?

Sumit Munot asked:

Open original thread
Very Specific problem,
In my Ruby On Rails Application(Web Site). I have dedicated server on Joyent Account. Also my website is hosted on Joyent. But it's down frequently my passenger get down after each 2 or 3 days. I am unable to find out the reason. I have asked this question on Joyent forums. But not getting the actual cause of the problem.

This is the last error log after which the application stops working
[Tue Feb 05 06:07:47 2013] [error] [client IP_ADDRESS] Premature end of script headers:
[ pid=18125 thr=1 file=ext/apache2/Hooks.cpp:817 time=2013-02-05 06:07:47.254 ]  The backend application (process 26887) 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.

27795 exit signal
Segmentation fault (11)
[Tue Feb 05 06:07:47 2013] [notice] child pid 22071 exit signal
Segmentation fault (11)
[Tue Feb 05 06:07:47 2013] [notice] child pid 13025 exit signal
Segmentation fault (11)
[Tue Feb 05 06:07:47 2013] [notice] child pid 24538 exit signal
Segmentation fault (11)
[Tue Feb 05 06:07:47 2013] [notice] child pid 17065 exit signal
Segmentation fault (11)


I am using,

Ruby 1.9.2p180
   Rails 3.0.5
   Phusion Passenger version 3.0.17
   Apache version 2.2.19
   Mysql version 5.5.13



I Googled and found some solutions on forum given below for the problems.

I have found the reason behind the error "premature end of script headers" in passenger error log.

1. Memory Issue  
    2. Gem version issue
    3. Ruby version
    4. Ruby Java Bridge(RJB) compatibility with JVM
    5. File/directory Permissions


Also, i have found the solution for each of the above problems and i have tried all of them.

1. Memory issue : Set MaximumPoolSize 120 in passenger conf as we are using 8Gb RAM in our project
    2. Gem version issue : libxml-ruby and rack version should be 1.1.3 and 1.1.0 earlier versions are stable.
    3. Ruby version : May fix with change the version of ruby. In our project we are using ruby 1.9.2
    4. Ruby Java Bridge(RJB) : This may be the reason in our project we are using Java 1.6.0 and RJB is buggy with Java 1.6.0. So RJB is compatible with Java 1.5. Downgrading Java 1.6 to Java 1.5 may be solution to our problems.
    5. File/directory Permissions : The file of the permission drwxr-xrwx cause the above error, So we can change the file permission using "chmod 755 my_dir_name"(drwxr-xr-x) or "chown filename" or by changing cpanel/script username and password


Still it's not working then i use,

RailsSpawnMethod conservative in apache conf


But still the application gets down after one
or two days. And I am unable to find the trace.

Please help.
Tags: SQL, Ruby, Rails, Apache, Server, Server control

Plain Text
ASM
ASP
ASP.NET
BASIC
BAT
C#
C++
COBOL
CoffeeScript
CSS
Dart
dbase
F#
FORTRAN
HTML
Java
Javascript
Kotlin
Lua
MIDL
MSIL
ObjectiveC
Pascal
PERL
PHP
PowerShell
Python
Razor
Ruby
Scala
Shell
SLN
SQL
Swift
T4
Terminal
TypeScript
VB
VBScript
XML
YAML

Preview



When answering a question please:
  1. Read the question carefully.
  2. Understand that English isn't everyone's first language so be lenient of bad spelling and grammar.
  3. If a question is poorly phrased then either ask for clarification, ignore it, or edit the question and fix the problem. Insults are not welcome.
  4. Don't tell someone to read the manual. Chances are they have and don't get it. Provide an answer or move on to the next question.
Let's work to help developers, not make them feel stupid.
Please note that all posts will be submitted under the http://www.codeproject.com/info/cpol10.aspx.



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900