Premature end of script headers - passenger 2.2.5 / rails 2.3.4

260 views
Skip to first unread message

Maciej Litwiniuk

unread,
Sep 10, 2009, 7:08:55 PM9/10/09
to Phusion Passenger Discussions
Hi,
I'm still getting "Premature end of script headers" error. This error
only occurs when I send data via POST method. This did not happen,
when I used rails 2.3.2 and passenger 2.1.2. After update something is
f... up.

Environment:
Passenger 2.2.5
rails 2.3.4
rack 1.0
PassengerResolveSymlinksInDocumentRoot on
PassengerUserSwitching on
PassengerHighPerformance on


I hope, that you will be able to give me some kind of sollution.

Regards,
Maciej Litwiniuk

Maciej Litwiniuk

unread,
Sep 11, 2009, 5:55:52 AM9/11/09
to Phusion Passenger Discussions
I'm getting strange error on apache side:

"""
File "/opt/ruby-enterprise-1.8.6-20090201/lib/ruby/gems/1.8/gems/
passenger-2.2.5/lib/phusion_passenger/wsgi/request_handler.py", line
59, in main_loop
self.process_request(env, input_stream, client)
File "/opt/ruby-enterprise-1.8.6-20090201/lib/ruby/gems/1.8/gems/
passenger-2.2.5/lib/phusion_passenger/wsgi/request_handler.py", line
164, in process_request
result = self.app(env, start_response)
File "passenger_wsgi.py", line 69, in __call__
iheaders_fp = file(iheaders, 'w')
<type 'exceptions.IOError'>:
[ pid=10642 file=ext/apache2/Hooks.cpp:682 time=2009-09-11
11:41:51.40 ]:
The backend application (process 10457) 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.
"""

What's strange is that some application works correctly, some works
partialy and some do not work at all. In development environment
(script/server) everything works like a charm.

Django apps also stoped working.

Any clue?

When i intentionally insert bug in code (call to undefined method of
nil object) rails seems to report bug correctly.


Maciej Litwiniuk

unread,
Sep 11, 2009, 6:05:50 AM9/11/09
to Phusion Passenger Discussions
Ok, i've found it. Mysql gem for some reason didn't built properly,
but it was installed in system. Removing newer version and restoring
older one solved the problem.

For everyone with "Premature end of script headers" problem:
switch apache LogLevel to info and observe servers error_log.
Reply all
Reply to author
Forward
0 new messages