Hi,
I have set up Apache 2, FastCGI on W2K. My Rails project seems to run
fine. I wanted to test how many FastCGI processes I would need. So I
created a new project with 1 controller, that has 1 method :
def index
s = Time.new
while Time.new - 3 < s
end
render_text “#{s.strftime(’%H:%M:%S’)} -
#{Time.new.strftime(’%H:%M:%S’)}”
end
The idea is to simulate a longer request.
I started Apache, opened up my browser and got the expected response.
I then opened up another instance of the browser requested the page from
both browsers.
I expected Apache to send the second request to another instance of
Rails/FastCGI - I can see lots of these processes in my task manager.But
it did not.
The second request seemed to queue and only returned after the first
request completed. The logs seemed to confirm this.
This seems more of an Apache/W2K issue, but does anyone have any ideas?
Silly question, but are you sure this request is going to FastCGI, not
just CGI?
You should have a line like this in public/.htaccess:
RewriteRule ^(.)$ dispatch.fcgi [QSA,L]
By default, it’s:
RewriteRule ^(.)$ dispatch.cgi [QSA,L]
A simple test: kill all the FastCGI processes and request a page.
Silly question, but are you sure this request is going to FastCGI, not
just CGI?
You should have a line like this in public/.htaccess:
RewriteRule ^(.)$ dispatch.fcgi [QSA,L]
By default, it’s:
RewriteRule ^(.)$ dispatch.cgi [QSA,L]
A simple test: kill all the FastCGI processes and request a page.
Scott
Hi Scott,
thanks for the reply.
I am sure that it is running through FastCGI .htaccess is set for .fcgi.
To test I commented out the while condition - the page renders
immediately, not at CGI speeds.
Shashy
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.