Christian Neuhaus
2006-Aug-15 20:25 UTC
[Rails] Apache & FCGI: Premature end of script headers:
Hi, I have quite a problem right now. After finish of development I installed rails with fcgi and apache on my production env. Everything seems to be configured ok, but once I while I get the famous error message: " Premature end of script headers: dispatch.fcgi" I cant see any generel configuration problem, as sometimes everything is running fine. Maybe it is a problem related to timing: <IfModule mod_fcgid.c> AddHandler fcgid-script .fcgi SocketPath /var/lib/apache2/fcgid/sock DefaultInitEnv RAILS_ENV production IPCCommTimeout 50 IPCConnectTimeout 50 MaxProcessCount 40 ProcessLifeTime 86400 IdleTimeout 80 DefaultMaxClassProcessCount 8 </IfModule> Dispatch.fcgi is running fine if I start direct from command line with the following message (ignore the warning - I have to clean this up): ../config/../vendor/date.rb:3: warning: already initialized constant MONTHNAMES ../config/../app/helpers/account_helper.rb:56: warning: don''t put space before argument parentheses ../config/../app/helpers/account_helper.rb:57: warning: don''t put space before argument parentheses ../config/../app/controllers/application.rb:27: warning: already initialized constant EventRepType Status: 500 Internal Server Error Content-Type: text/html <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <body> <h1>Application error</h1> <p>Change this error message for exceptions thrown outside of an action (like in Dispatcher setups or broken Ruby code) in public/500.html</p> </body> </ht> Any help would be very much appreciated ! Regards Christian -- Posted via http://www.ruby-forum.com/.
Christian, My sincere advice. Dump Apache & FCGI and move to Lighttpd w/ SCGI or Mongrel. Lighttpd w/ SCGI is a breeze to install and you wont regret it. I moved over after facing stupid FCGI errors which were not even consistent! http://wiki.rubyonrails.org/rails/pages/HowToDeployWithLighttpdOnWindows I am assuming that you are trying this out on windows Regards, Navin Samuel On 8/15/06, Christian Neuhaus <chris_neuhaus@yahoo.com> wrote:> > Hi, > I have quite a problem right now. After finish of development I > installed rails with fcgi and apache on my production env. Everything > seems to be configured ok, but once I while I get the famous error > message: > " Premature end of script headers: dispatch.fcgi" > > I cant see any generel configuration problem, as sometimes everything is > running fine. > > Maybe it is a problem related to timing: > > <IfModule mod_fcgid.c> > AddHandler fcgid-script .fcgi > SocketPath /var/lib/apache2/fcgid/sock > DefaultInitEnv RAILS_ENV production > IPCCommTimeout 50 > IPCConnectTimeout 50 > MaxProcessCount 40 > ProcessLifeTime 86400 > IdleTimeout 80 > DefaultMaxClassProcessCount 8 > </IfModule> > > Dispatch.fcgi is running fine if I start direct from command line with > the following message (ignore the warning - I have to clean this up): > > ../config/../vendor/date.rb:3: warning: already initialized constant > MONTHNAMES > ../config/../app/helpers/account_helper.rb:56: warning: don''t put space > before argument parentheses > ../config/../app/helpers/account_helper.rb:57: warning: don''t put space > before argument parentheses > ../config/../app/controllers/application.rb:27: warning: already > initialized constant EventRepType > Status: 500 Internal Server Error > Content-Type: text/html > > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" > "http://www.w3.org/TR/html4/loose.dtd"> > <html> > <body> > <h1>Application error</h1> > <p>Change this error message for exceptions thrown outside of an > action (like in Dispatcher setups or broken Ruby code) in > public/500.html</p> > </body> > </ht> > > Any help would be very much appreciated ! > > Regards > Christian > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-- Regards, Navin Samuel -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060815/7a962070/attachment.html
Christian Neuhaus
2006-Aug-17 07:38 UTC
[Rails] Re: Apache & FCGI: Premature end of script headers
Hi Navin, thanks for your information. I am running my v-server on Debian with Apache2. As the server is sometimes running fine and really fast I wanted keep my installation when possible. But if I cant find a solution here, I will surely think about your suggestion and post the result here. If (in the meanwhile) anybody had similar experience with Apache & FastCGI - and solved it please let me know :-) Regards, Christian -- Posted via http://www.ruby-forum.com/.