What are the main reasons for passenger server shu

2019-04-13 00:25发布

问题:

In my rails application, I am using

Apache + ruby 1.9.2p180 + Rails 3.0.5 + Phusion Passenger version 3.0.13

Can somebody please tell me why my passenger shut down periodically. Somebody please help

This is the last error after which the application stops working

[Fri Aug 31 02:07:23 2012] [error] [client 141.212.121.10] Premature end 
of script headers: 
[ pid=17952 thr=1 file=ext/apache2/Hooks.cpp:817 time=2012-08-31 
02:07:23.257 ]: The backend application (process 13680) 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. 
[Fri Aug 31 04:20:55 2012] [notice] child pid 27795 exit signal 
Segmentation fault (11) 
[Fri Aug 31 04:20:56 2012] [notice] child pid 22071 exit signal 
Segmentation fault (11) 
[Fri Aug 31 04:21:03 2012] [notice] child pid 13025 exit signal 
Segmentation fault (11) 
[Fri Aug 31 04:21:04 2012] [notice] child pid 24538 exit signal 
Segmentation fault (11) 
[Fri Aug 31 04:21:06 2012] [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.13

Thanks in advance.

回答1:

The error says : "please check whether there are crashing bugs in this application."

Did you try to remove your web application, and try with a simple index.html page ?

If it's stable then the issue doesn't come from Passenger config, but rather in your application. In this case, increase the log verbosity by adding loger in your application at each step there is a user interaction.

Check also that you are using apache2-mpm-prefork and not apache2-mpm-worker. This apache2-mpm-worker is a multi-thread version, and unfortunately passenger doesn't support multi-thread with apache2. Try following commands to check wether it is installed or not :

aptitude show apache2-mpm-worker
aptitude show apache2-mpm-prefork

What does this command shows ?

passenger-install-apache2-module

You should have everything green.