Hi, I am attempting to get fastcgi configured on windows with apache 2.0. I believe I have everything configured properly,b ut whenn I go to bring up a simple hello world controller it seems to take about 6-7 seconds for each request. I see the ruby.exe process spike to about 80% of cpu utiliization. When my request is over I noticed that there is not ruby.exe process. Shouldn''t the ruby.exe process stay??? I have checked and double checked my .htaccess file and my rewrite rules points to .fcgi and not .cgi. Did I miss something? Below is my .htaccess file if it will help: # General Apache options AddHandler fastcgi-script .fcgi #AddHandler cgi-script .cgi AddHandler cgi-script .fcgi Options +FollowSymLinks +ExecCGI # If you don''t want Rails to look in certain directories, # use the following rewrite rules so that Apache won''t rewrite certain requests # # Example: # RewriteCond %{REQUEST_URI} ^/notrails.* # RewriteRule .* - [L] # Redirect all requests not available on the filesystem to Rails # By default the cgi dispatcher is used which is very slow # # For better performance replace the dispatcher with the fastcgi one # # Example: # RewriteRule ^(.*)$ dispatch.fcgi [QSA,L] RewriteEngine On RewriteBase /dispatch.fcgi RewriteRule ^$ index.html [QSA] RewriteRule ^([^.]+)$ $1.html [QSA] RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ dispatch.fcgi [QSA,L] # In case Rails experiences terminal errors # Instead of displaying this message you can supply a file here which will be rendered instead # # Example: # ErrorDocument 500 /500.html ErrorDocument 500 "<h2>Application error</h2>Rails application failed to start properly" -- Scott F. Walter Scott F. Walter Principal Consultant Vivare, Inc. E: scott.walter-uosFFu51klvQT0dZR+AlfA@public.gmane.org E: scott-APWf0AbNa2kIjDr1QQGPvw@public.gmane.org Visit scottwalter.com <http://scottwalter.com> --Point. Click. Explore!
Hi, I am attempting to get fastcgi configured on windows with apache 2.0. I believe I have everything configured properly,b ut whenn I go to bring up a simple hello world controller it seems to take about 6-7 seconds for each request. I see the ruby.exe process spike to about 80% of cpu utiliization. When my request is over I noticed that there is not ruby.exe process. Shouldn''t the ruby.exe process stay??? I have checked and double checked my .htaccess file and my rewrite rules points to .fcgi and not .cgi. Did I miss something? Below is my .htaccess file if it will help: # General Apache options AddHandler fastcgi-script .fcgi #AddHandler cgi-script .cgi AddHandler cgi-script .fcgi Options +FollowSymLinks +ExecCGI # If you don''t want Rails to look in certain directories, # use the following rewrite rules so that Apache won''t rewrite certain requests # # Example: # RewriteCond %{REQUEST_URI} ^/notrails.* # RewriteRule .* - [L] # Redirect all requests not available on the filesystem to Rails # By default the cgi dispatcher is used which is very slow # # For better performance replace the dispatcher with the fastcgi one # # Example: # RewriteRule ^(.*)$ dispatch.fcgi [QSA,L] RewriteEngine On RewriteBase /dispatch.fcgi RewriteRule ^$ index.html [QSA] RewriteRule ^([^.]+)$ $1.html [QSA] RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ dispatch.fcgi [QSA,L] # In case Rails experiences terminal errors # Instead of displaying this message you can supply a file here which will be rendered instead # # Example: # ErrorDocument 500 /500.html ErrorDocument 500 "<h2>Application error</h2>Rails application failed to start properly" -- -- Scott F. Walter Scott F. Walter Principal Consultant Vivare, Inc. E: scott.walter-uosFFu51klvQT0dZR+AlfA@public.gmane.org E: scott-APWf0AbNa2kIjDr1QQGPvw@public.gmane.org Visit scottwalter.com <http://scottwalter.com> --Point. Click. Explore!
Scott F. Walter wrote:> Hi, > > I am attempting to get fastcgi configured on windows with apache 2.0. > I believe I have everything configured properly,b ut whenn I go to > bring up a simple hello world controller it seems to take about 6-7 > seconds for each request. I see the ruby.exe process spike to about > 80% of cpu utiliization. When my request is over I noticed that > there is not ruby.exe process. Shouldn''t the ruby.exe process stay??? > > I have checked and double checked my .htaccess file and my rewrite > rules points to .fcgi and not .cgi. Did I miss something? > > Below is my .htaccess file if it will help: > > # General Apache options > AddHandler fastcgi-script .fcgi > #AddHandler cgi-script .cgi > AddHandler cgi-script .fcgi > Options +FollowSymLinks +ExecCGI > > # If you don''t want Rails to look in certain directories, > # use the following rewrite rules so that Apache won''t rewrite certain > requests > # > # Example: > # RewriteCond %{REQUEST_URI} ^/notrails.* > # RewriteRule .* - [L] > > # Redirect all requests not available on the filesystem to Rails > # By default the cgi dispatcher is used which is very slow > # > # For better performance replace the dispatcher with the fastcgi one > # > # Example: > # RewriteRule ^(.*)$ dispatch.fcgi [QSA,L] > RewriteEngine On > RewriteBase /dispatch.fcgi > RewriteRule ^$ index.html [QSA] > RewriteRule ^([^.]+)$ $1.html [QSA] > RewriteCond %{REQUEST_FILENAME} !-f > RewriteRule ^(.*)$ dispatch.fcgi [QSA,L] > > # In case Rails experiences terminal errors > # Instead of displaying this message you can supply a file here which > will be rendered instead > # > # Example: > # ErrorDocument 500 /500.html > > ErrorDocument 500 "<h2>Application error</h2>Rails application failed > to start properly" > > >ok I figured out my problem. I had both: AddHandler cgi-script .fcgi and AddHandler fastcgi-script .fcgi enabled. So I removed AddHandler cgi-script .fcgi and it seemed to work. However if I access a controller that uses a database I get this error: uninitialized constant Mysql Is there something I need to do configure apache/fastcgi to reference a database? scott. -- Scott F. Walter Scott F. Walter Principal Consultant Vivare, Inc. E: scott.walter-uosFFu51klvQT0dZR+AlfA@public.gmane.org E: scott-APWf0AbNa2kIjDr1QQGPvw@public.gmane.org Visit scottwalter.com <http://scottwalter.com> --Point. Click. Explore!
Scott F. Walter wrote: (...snip...)> ok I figured out my problem. I had both: > AddHandler cgi-script .fcgi and AddHandler fastcgi-script .fcgi > enabled. So I removed AddHandler cgi-script .fcgi and it seemed to work. > > However if I access a controller that uses a database I get this error: > > uninitialized constant Mysql > > Is there something I need to do configure apache/fastcgi to reference a > database? > > scott. > >My immediate guess would be the installation of the mysql devel libraries. I seem to remember that I had to install them in order to even get the fastcgi stuff installed. I think it is referred in the wiki fastcgi installation pages. There are multiple. I remember using two of them interchangeably. For the MySQL-devel stuff there was a reference in one of them to an rpm package, I vaguely recollect at least... Ronny