Hi, I''ve just tried to get FastCGI up and running so I can see the performance increase it offers over normal CGI. I think I''ve got everything installed correctly, but I''m receiving these errors in my apache.log for every request (Real URL removed ;) : [Sun Feb 13 11:29:19 2005] [error] [client 192.168.2.2] FastCGI: comm with (dynamic) server "/home/www/state/public/dispatch.fcgi" aborted: (first read) idle timeout (30 sec), referer: http://url [Sun Feb 13 11:29:19 2005] [error] [client 192.168.2.2] FastCGI: incomplete headers (0 bytes) received from server "/home/www/state/public/dispatch.fcgi", referer: http://url I''m running Fedora Core 3, and here are the steps I took in installing it : 1. gem install fcgi 2. Got fcgi-2.4.1-SNAP-0311112127.tar.gz from fastcgi.com : ./configure make make install 3. Got mod_fastcgi-SNAP-0404142202.tar.gz from fastcgi.com : cp Makefile.AP2 Makefile make top_dir=/usr/lib/httpd make install top_dir=/usr/lib/httpd 4. Editted httpd.conf, adding : LoadModule mod_fastcgi modules/mod_fastcgi.so <IfModule mod_fastcgi.c> FastCgiIpcDir /tmp/fcgi_ipc/ AddHandler fastcgi-script .fcgi </IfModule> 5. /sbin/service httpd restart Apache restarted OK, and when I refresh my browser, it just sits there for 30 seconds or so before returning a 500. Is there anything I''ve either missed out, or done wrong? Any help would be gratefully received. Regards. Carl.
carl wrote:> Hi, > > I''ve just tried to get FastCGI up and running so I can see the > performance increase it offers over normal CGI. I think I''ve got > everything installed correctly, but I''m receiving these errors in my > apache.log for every request (Real URL removed ;) : > > [Sun Feb 13 11:29:19 2005] [error] [client 192.168.2.2] FastCGI: > comm with (dynamic) server "/home/www/state/public/dispatch.fcgi" > aborted: (first read) idle timeout (30 sec), referer: http://url > [Sun Feb 13 11:29:19 2005] [error] [client 192.168.2.2] FastCGI: > incomplete headers (0 bytes) received from server > "/home/www/state/public/dispatch.fcgi", referer: http://url > > I''m running Fedora Core 3, and here are the steps I took in installing > it : > > 1. gem install fcgi > > 2. Got fcgi-2.4.1-SNAP-0311112127.tar.gz from fastcgi.com : > ./configure > make > make install > > 3. Got mod_fastcgi-SNAP-0404142202.tar.gz from fastcgi.com : > cp Makefile.AP2 Makefile > make top_dir=/usr/lib/httpd > make install top_dir=/usr/lib/httpd > > 4. Editted httpd.conf, adding : > LoadModule mod_fastcgi modules/mod_fastcgi.so > <IfModule mod_fastcgi.c> > FastCgiIpcDir /tmp/fcgi_ipc/ > AddHandler fastcgi-script .fcgi > </IfModule> > > 5. /sbin/service httpd restart > > Apache restarted OK, and when I refresh my browser, it just sits there > for 30 seconds or so before returning a 500. Is there anything I''ve > either missed out, or done wrong? Any help would be gratefully received. > > Regards. > Carl. > > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails > >And what apache complains about in it''s logs? Try to check /tmp/fcgi_ipc/ owner/permissions - it solved same trouble in my case
On Sun, 13 Feb 2005, carl wrote:> I''ve just tried to get FastCGI up and running so I can see the performance > increase it offers over normal CGI. I think I''ve got everything installed > correctly, but I''m receiving these errors in my apache.log for every request > (Real URL removed ;) : > > [Sun Feb 13 11:29:19 2005] [error] [client 192.168.2.2] FastCGI: comm with > (dynamic) server "/home/www/state/public/dispatch.fcgi" aborted: (first read) > idle timeout (30 sec), referer: http://url > [Sun Feb 13 11:29:19 2005] [error] [client 192.168.2.2] FastCGI: incomplete > headers (0 bytes) received from server > "/home/www/state/public/dispatch.fcgi", referer: http://url > > I''m running Fedora Core 3, and here are the steps I took in installing it : > > 1. gem install fcgi > > 2. Got fcgi-2.4.1-SNAP-0311112127.tar.gz from fastcgi.com : > ./configure > make > make install > > 3. Got mod_fastcgi-SNAP-0404142202.tar.gz from fastcgi.com : > cp Makefile.AP2 Makefile > make top_dir=/usr/lib/httpd > make install top_dir=/usr/lib/httpd > > 4. Editted httpd.conf, adding : > LoadModule mod_fastcgi modules/mod_fastcgi.so > <IfModule mod_fastcgi.c> > FastCgiIpcDir /tmp/fcgi_ipc/ > AddHandler fastcgi-script .fcgi > </IfModule> > > 5. /sbin/service httpd restart > > Apache restarted OK, and when I refresh my browser, it just sits there for > 30 seconds or so before returning a 500. Is there anything I''ve either > missed out, or done wrong? Any help would be gratefully received.what happens if you do ~ > su - apache ~ > ./yourapp.fcgi ?? -a -- ==============================================================================| EMAIL :: Ara [dot] T [dot] Howard [at] noaa [dot] gov | PHONE :: 303.497.6469 | When you do something, you should burn yourself completely, like a good | bonfire, leaving no trace of yourself. --Shunryu Suzuki ===============================================================================
> what happens if you do > > ~ > su - apache > > ~ > ./yourapp.fcgiSolved it! Trying the above ended up with an error saying it couldn''t load fcgi.so. Running ldd on it revealed that it couldn''t find libcfgi.so, which had been installed in /usr/local/lib. Of course, I hadn''t added that path to ld.so.conf. Adding it and running /sbin/ldconfig solved the problem. And I''ve got to say, I''m impressed with the performance of it! Thanks for the help. Regards, Carl.
On Sun, 13 Feb 2005, carl wrote:>> what happens if you do >> >> ~ > su - apache >> >> ~ > ./yourapp.fcgi > > Solved it! Trying the above ended up with an error saying it couldn''t load > fcgi.so. Running ldd on it revealed that it couldn''t find libcfgi.so, which > had been installed in /usr/local/lib. Of course, I hadn''t added that path to > ld.so.conf. Adding it and running /sbin/ldconfig solved the problem. > > And I''ve got to say, I''m impressed with the performance of it! Thanks for > the help. > > Regards, > Carl.great. better than messing with ldconfig is simply to export LD_RUN_PATH=/full/path/to/ruby/lib/arch/ anytime you are compiling, using gems, rpa, etc. cheers. -a -- ==============================================================================| EMAIL :: Ara [dot] T [dot] Howard [at] noaa [dot] gov | PHONE :: 303.497.6469 | When you do something, you should burn yourself completely, like a good | bonfire, leaving no trace of yourself. --Shunryu Suzuki ===============================================================================