Forum: Ruby on Rails Apache FastCGI seems single threaded (W2K)

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Shashy (Guest)
on 2006-01-26 16:05
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?

Thanks, Shashy
Scott W. (Guest)
on 2006-01-26 19:09
(Received via mailing list)
Quoting S. <removed_email_address@domain.invalid>:

> end
>
> Thanks, Shashy
>
> --
> Posted via http://www.ruby-forum.com/.
> _______________________________________________
> Rails mailing list
> removed_email_address@domain.invalid
> http://lists.rubyonrails.org/mailman/listinfo/rails
>

Shasy,

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
Shashy (Guest)
on 2006-01-26 21:30
Scott W. wrote:
> Quoting S. <removed_email_address@domain.invalid>:
>
>> end
>>
>> Thanks, Shashy
>>
>> --
>> Posted via http://www.ruby-forum.com/.
>> _______________________________________________
>> Rails mailing list
>> removed_email_address@domain.invalid
>> http://lists.rubyonrails.org/mailman/listinfo/rails
>>
>
> Shasy,
>
> 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 topic is locked and can not be replied to.