Click here to Skip to main content
15,885,309 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
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.
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



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