Forum: Ruby on Rails SCGI and Concurrency

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.
lists (Guest)
on 2005-12-10 01:44
(Received via mailing list)
A potentially dumb SCGI question here...

I am trying out SCGI. It's a great departure from the complexity of
FastCGI.

Anyway, with FCGI I am used to seeing multiple dispatcher.fcgi processes
in
my 'ps aux' output.

With SCGI I see only a single entry. I assume then that SCGI is doing
internal threading instead of process forking?

The only thing that threw me is that with FCGI I would see multiple
database
connections open and I only see a single connection with my SCGI setup.

Did I miss a flag to have multiple listeners? Looking at the doco, I
didn't
see anything.

If anyone has any info, it is appreciated.

Cheers.
francois.beausoleil (Guest)
on 2005-12-10 03:34
(Received via mailing list)
Hi !

2005/12/9, Hunter's Lists <removed_email_address@domain.invalid>:
> A potentially dumb SCGI question here...

Nope, never.  What you want is an SCGI cluster.

Works mostly the same way, except you replace scgi_ctrl with
scgi_cluster.

Configuration example:
scgi_cluster config -c 3 -e production -p 2049 -h 127.0.0.1

Configure 3 children (-c 3) in production environment (-e production),
listening on consecutive ports starting at 2049 (-p 2049), and bind
only on 127.0.0.1 (-h 127.0.0.1).

Then, you start the cluster like this:
scgi_cluster start

Hope that helps !
lists (Guest)
on 2005-12-10 04:36
(Received via mailing list)
Excellent!

I did see that in the documentation.

Now, on to my next question - do I have to change my Apache 2 config?

I have a single SCGIMount directive:

SCGIMount / 127.0.0.1:9999

Do I need to do anything to tell Apache to hand off to the extra
instances?

Thanks again,
Hunter

> From: Francois B. <removed_email_address@domain.invalid>
> Reply-To: <removed_email_address@domain.invalid>
> Date: Fri, 9 Dec 2005 20:33:05 -0500
> To: <removed_email_address@domain.invalid>
> Subject: Re: [Rails] SCGI and Concurrency
>
> Hi !

2005/12/9, Hunter's Lists <removed_email_address@domain.invalid>:
> A potentially
> dumb SCGI question here...

Nope, never.  What you want is an SCGI
> cluster.

Works mostly the same way, except you replace scgi_ctrl with
> scgi_cluster.

Configuration example:
scgi_cluster config -c 3 -e production
> -p 2049 -h 127.0.0.1

Configure 3 children (-c 3) in production environment
> (-e production),
listening on consecutive ports starting at 2049 (-p 2049),
> and bind
only on 127.0.0.1 (-h 127.0.0.1).

Then, you start the cluster like
> this:
scgi_cluster start

Hope that helps !
--
Fran├žois
> Beausoleil
http://blog.teksol.info/
francois.beausoleil (Guest)
on 2005-12-10 05:49
(Received via mailing list)
Hi !

2005/12/9, Hunter's Lists <removed_email_address@domain.invalid>:
> Now, on to my next question - do I have to change my Apache 2 config?

Eh, I have the same problem.  Seems Apache does not play well with
SCGI clusters...  See the thread entitled "SCGI cluster configuration
example for Apache".  I can't provide you with a link, unfortunately,
because I can't find it in the gmane archive...

There were two solutions in there.  Haven't tried any of them yet.

Bye !
lists (Guest)
on 2005-12-11 00:07
(Received via mailing list)
Yeah, I can't find the thread either...

Does anyone have a link?


> From: Francois B. <removed_email_address@domain.invalid>
> Reply-To: <removed_email_address@domain.invalid>
> Date: Fri, 9 Dec 2005 22:46:18 -0500
> To: <removed_email_address@domain.invalid>
> Subject: Re: [Rails] SCGI and Concurrency
>
> Hi !

2005/12/9, Hunter's Lists <removed_email_address@domain.invalid>:
> Now, on to my
> next question - do I have to change my Apache 2 config?

Eh, I have the same
> problem.  Seems Apache does not play well with
SCGI clusters...  See the
> thread entitled "SCGI cluster configuration
example for Apache".  I can't
> provide you with a link, unfortunately,
because I can't find it in the gmane
> archive...

There were two solutions in there.  Haven't tried any of them
> yet.

Bye !
--
Fran├žois Beausoleil
http://blog.teksol.info/
jonathan.tron.mailings (Guest)
on 2005-12-11 10:24
(Received via mailing list)
2005/12/10, Hunter's Lists <removed_email_address@domain.invalid>:
> Yeah, I can't find the thread either...
>
> Does anyone have a link?

Here it is : http://article.gmane.org/gmane.comp.lang.ruby.rails/33836
Hunter's Lists (Guest)
on 2005-12-11 22:57
(Received via mailing list)
Thanks.

So, is anyone using this method or using an SCGI cluster with Apache 2?

Does this uber hack work?

Hunter
This topic is locked and can not be replied to.