Error Reading Data From Fastcgi Server Ruby
List Log In Can't get Ruby on Rails with Apache and FastCGI kpmcnamee (Guest) on 2007-05-08 16:26 Hi! Environment ========= Solaris 10 Apache 2.2.0 with fcgid_module Ruby 1.8.4 Rails 1.2.3 I am trying to get FastCGI working. Initially I used "dispatch.cgi" successfully but when I switched to "dispatch.fcgi" I get ==================================================== Application error Rails application failed to start properly ==================================================== and ==================================================== [Tue May 08 16:07:10 2007] [warn] (146)Connection refused: mod_fcgid: read data from fastcgi server error. [Tue May 08 16:07:10 2007] [error] [client 123.123.123.123] Premature end of script headers: dispatch.fcgi ==================================================== So I tried to run the script directly: ==================================================== > ruby public/dispatch.fcgi /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/ active_support/dependencies.rb:266:in `load_missing_constant': uninitialized constant RailsFCGIHandler (NameError) from /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/ active_support/dependencies.rb:452:in `const_missing' from /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/ active_support/dependencies.rb:464:in `const_missing' from public/dispatch.fcgi:24 ==================================================== I have read that this means that the fcgi module is missing, so I tried installing it: ==================================================== > gem install fcgi Building native extensions. This could take a while... ERROR: While executing gem ... (Gem::Installer::ExtensionBuildError) ERROR: Failed to build gem native extension. ruby extconf.rb install fcgi checking for fcgiapp.h... no checking for fastcgi/fcgiapp.h... no *** extconf.rb failed *** Could not create Makefile due to some reason, probably lack of necessary libraries and/or hea
and its working fine when i run ruby script/rails server webrick -e production and i can able to access it from http://redmine:3000/. but when i am accessing it from http://redmine/ i am getting following error Application https://www.ruby-forum.com/topic/107382 error Rails application failed to start properly Logs error: Apache error_log from /usr/lib/ruby/gems/1.8/gems/bundler-1.2.0/lib/bundler/runtime.rb:66:in `each' from /usr/lib/ruby/gems/1.8/gems/bundler-1.2.0/lib/bundler/runtime.rb:66:in `require' from /usr/lib/ruby/gems/1.8/gems/bundler-1.2.0/lib/bundler/runtime.rb:55:in `each' from /usr/lib/ruby/gems/1.8/gems/bundler-1.2.0/lib/bundler/runtime.rb:55:in `require' from /usr/lib/ruby/gems/1.8/gems/bundler-1.2.0/lib/bundler.rb:128:in `require' from /var/www/redmine/config/application.rb:7 from /var/www/redmine/public/../config/environment.rb:2:in `require' from /var/www/redmine/public/../config/environment.rb:2 from /var/www/redmine/public/dispatch.fcgi:4:in `require' from /var/www/redmine/public/dispatch.fcgi:4 http://www.redmine.org/boards/2/topics/33306 redmine_error log [Mon Sep 17 00:43:30 2012] [warn] [client 192.168.9.7] (104)Connection reset by peer: mod_fcgid: error reading data from FastCGI server [Mon Sep 17 00:43:30 2012] [error] [client 192.168.9.7] Premature end of script headers: dispatch.fcgi [Mon Sep 17 00:44:55 2012] [warn] [client 192.168.9.7] (104)Connection reset by peer: mod_fcgid: error reading data from FastCGI server [Mon Sep 17 00:44:55 2012] [error] [client 192.168.9.7] Premature end of script headers: dispatch.fcgi [Mon Sep 17 00:47:39 2012] [warn] [client 192.168.9.7] (104)Connection reset by peer: mod_fcgid: error reading data from FastCGI server [Mon Sep 17 00:47:39 2012] [error] [client 192.168.9.7] Premature end of script headers: dispatch.fcgi [Mon Sep 17 00:47:43 2012] [warn] [client 192.168.9.7] (104)Connecti
& MappingSocial Networking & CommunicationUtilitiesWeb BrowsersComputer & HardwareGadgetsGaming & LeisureSmartphonesMobile AppsWindows Mobile (Pocket PC / PPC)Networking mod_fcgid Error Reading Data from FastCGI Server - Premature End of Script Headers Home»Cloud & Internet»Web Servers»mod_fcgid Error Reading Data from FastCGI https://techjourney.net/mod_fcgid-error-reading-data-from-fastcgi-server-premature-end-of-script-headers/ Server - Premature End of Script Headers mod_fcgid Error Reading Data from FastCGI Server - Premature End of Script Headers When running web app coding in https://bugs.launchpad.net/bugs/586716 PHP programming language, and which is assigned to the handler fcgid-script for execution through FastCGI protocol provided by mod_fcgid, the PHP script may run a while, error reading and then suddenly return HTTP status code of 500 Internal Server Error.
Internet Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator, email_address@techjourney.net and inform them of the time the error occurred, and anything you might have done that error reading data may have caused the error. More information about this error may be available in the server error log. Upon checking the Apache HTTPD web server error log, the following entries are logged: [Mon Mar 11 08:08:28 2015] [warn] [client 192.168.1.1] (104)Connection reset by peer: mod_fcgid: error reading data from FastCGI server, referer: https://techjourney.net/ [Mon Mar 11 08:08:28 2015] [error] [client 192.168.1.1] Premature end of script headers: backup.php, referer: https://techjourney.net/ The error can happen on any PHP script, but normally involves PHP script which takes a long time to complete its process, such as backup, import, export, deletion, replace and etc. The error is normally related to FcgidBusyTimeout (old name BusyTimeout) and/or FcgidIOTimeout (old name IPCCommTimeout) directive which defines the maximum time limit for request handling. If a FastCGI request does not complete within FcgidBusyTimeout seconds, it will be terminated and killed. The purpose of this directive is to terminate hung applications. By default, Fcgto Milestone redmine (Ubuntu) Edit Invalid Undecided Unassigned Edit You need to log in to change this bug's status. Affecting: redmine (Ubuntu) Filed here by: Marcin Juszkiewicz When: 2010-05-28 Completed: 2010-05-28 Target Distribution Baltix BOSS Juju Charms Collection Elbuntu Guadalinex Guadalinex Edu Kiwi Linux nUbuntu PLD Linux Tilix tuXlab Ubuntu Ubuntu Linaro Evaluation Build Ubuntu RTM Package (Find…) Project (Find…) Status Importance Invalid Undecided Assigned to Nobody Me Comment on this change (optional) Email me about changes to this bug report Also affects project (?) Also affects distribution/package Nominate for series Bug Description Binary package hint: redmine Redmine example configs and README.Debian says that running Redmine with FastCGI is suggested. But to get it running libfcgi-ruby1.8 was needed in my case. Otherwise /var/log/apache2/error.log gave me this: /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require': no such file to load -- fcgi (MissingSourceFile) from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `require' from /usr/share/redmine/vendor/rails/activesupport/lib/active_support/dependencies.rb:155:in `require' from /usr/share/redmine/vendor/rails/railties/lib/fcgi_handler.rb:1 from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require' from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `require' from /usr/share/redmine/vendor/rails/activesupport/lib/active_support/dependencies.rb:155:in `require' from /usr/share/redmine/public/dispatch.fcgi:22 [Fri May 28 10:07:08 2010] [warn] [client 127.0.2.1] (104)Connection reset by peer: mod_fcgid: error reading data from FastCGI server [Fri May 28 10:07:08 2010] [error] [client 127.0.2.1] Premature end of script headers: dispatch.fcgi [Fri May 28 10:07:09 2010] [notice] mod_fcgid: process /usr/share/redmine/public/dispatch.fcgi(13867) exit(communication error), terminated by calling exit(), return code: 1 Redmine 0.9.3-1 on Ubuntu 10.04 Add tags Tag help kapouer (kapouer) wrote on 2010-05-28: #1 "Redmine example configs and README.Debian says that running Redmine with FastCGI is suggested" redmine depends on rails... rails Suggests libfcgi-ruby1.8 and redmine package already Recommends libfcgi-ruby ! Please close that bug as invalid. Marcin Juszkiewicz (hrw) on 2010-05-28 Changed in redmine (Ubuntu): status: New → Invalid jnns (jnns) wrote on 2011-04-03: #2 > But to get it running libfcgi-ruby1.8 was needed in my case. Thanks for the hint!